|
1 | 1 | import mpy_coverage |
2 | 2 |
|
3 | 3 | mpy_coverage.run_one_arch("rv32imc", "rv32") |
| 4 | + |
| 5 | +print("Expected to compile") |
| 6 | +mpy_coverage.run_extra_cases( |
| 7 | + "rv32imc", |
| 8 | + [ |
| 9 | + "@micropython.asm_rv32\ndef f(): ebreak()", |
| 10 | + ], |
| 11 | +) |
| 12 | + |
| 13 | +print("Expected to fail") |
| 14 | +mpy_coverage.run_extra_cases( |
| 15 | + "rv32imc", |
| 16 | + [ |
| 17 | + "@micropython.asm_rv32\ndef f(a0, a1, a2, a3, a4): ac_li(a0, 1)", |
| 18 | + "@micropython.asm_rv32\ndef f(a0, a4): ac_li(a0, 1)", |
| 19 | + "@micropython.asm_rv32\ndef f(a0): csrrc()", |
| 20 | + "@micropython.asm_rv32\ndef f(a0): csrrc(s0, s0, s0)", |
| 21 | + "@micropython.asm_rv32\ndef f(a0): csrrc(s0, s0, 0xffffff)", |
| 22 | + "@micropython.asm_rv32\ndef f(a0): csrrc(s0, 0, s0)", |
| 23 | + "@micropython.asm_rv32\ndef f(a0): moo()", |
| 24 | + "@micropython.asm_rv32\ndef f(a0): beq(a0,a0,0)", |
| 25 | + "@micropython.asm_rv32\ndef f(a0): beq(a0,a0,3.14)", |
| 26 | + "@micropython.asm_rv32\ndef f(a0): beq(a0,a0,y)", |
| 27 | + "@micropython.asm_rv32\ndef f(): lw(a3, 99999(a3))", |
| 28 | + "@micropython.asm_rv32\ndef f(): lw()", |
| 29 | + "@micropython.asm_rv32\ndef f(): a=di(a2, a2, -1)", |
| 30 | + ], |
| 31 | +) |
0 commit comments