+ # Like test 2, but with jal instead of jalr.
+ li TESTNUM, 5
+ li t1, 0
+ la t0, 1f
+ jal t1, 2f
+1:
+ .option rvc
+ c.j 1f
+2:
+ c.j 2f
+ .option norvc
+1:
+ j fail
+2:
+
+ # Like test 2, but with a taken branch instead of jalr.
+ li TESTNUM, 6
+ li t1, 0
+ la t0, 1f
+ beqz x0, 2f
+1:
+ .option rvc
+ c.j 1f
+2:
+ c.j 2f
+ .option norvc
+1:
+ j fail
+2:
+
+ # Not-taken branches should not trap, even without RVC.
+ li TESTNUM, 7
+ bnez x0, 1f
+ j 2f
+ .option rvc
+ c.j 1f
+1:
+ c.j 1f
+ .option norvc
+1:
+ j fail
+2:
+