Commit 40585ea
py/emitnative: Emit shorter exception handler entry code on RV32.
This commit improves the RV32 code sequence that is emitted if a
function needs to set up an exception handler as its prologue.
The old code would clear a temporary register and then copy that value
to places that needed to be initialised with zero values. On RV32
there's a dedicated register that's hardwired to be equal to zero, which
allows us to bypass the extra register clear and use the zero register
to initialise values.
Signed-off-by: Alessandro Gatti <[email protected]>1 parent bfc0d7b commit 40585ea
2 files changed
+12
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
694 | 694 | | |
695 | 695 | | |
696 | 696 | | |
| 697 | + | |
697 | 698 | | |
698 | 699 | | |
699 | 700 | | |
| |||
756 | 757 | | |
757 | 758 | | |
758 | 759 | | |
| 760 | + | |
759 | 761 | | |
760 | 762 | | |
761 | 763 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
291 | 296 | | |
292 | 297 | | |
293 | 298 | | |
| |||
1200 | 1205 | | |
1201 | 1206 | | |
1202 | 1207 | | |
1203 | | - | |
1204 | | - | |
| 1208 | + | |
| 1209 | + | |
1205 | 1210 | | |
1206 | 1211 | | |
1207 | 1212 | | |
1208 | | - | |
| 1213 | + | |
1209 | 1214 | | |
1210 | 1215 | | |
1211 | 1216 | | |
| |||
1221 | 1226 | | |
1222 | 1227 | | |
1223 | 1228 | | |
1224 | | - | |
1225 | | - | |
| 1229 | + | |
| 1230 | + | |
1226 | 1231 | | |
1227 | 1232 | | |
1228 | 1233 | | |
| |||
0 commit comments