aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite/gas/loongarch/pseudo_op_option.s
diff options
context:
space:
mode:
Diffstat (limited to 'gas/testsuite/gas/loongarch/pseudo_op_option.s')
-rw-r--r--gas/testsuite/gas/loongarch/pseudo_op_option.s19
1 files changed, 19 insertions, 0 deletions
diff --git a/gas/testsuite/gas/loongarch/pseudo_op_option.s b/gas/testsuite/gas/loongarch/pseudo_op_option.s
new file mode 100644
index 0000000..f21b726
--- /dev/null
+++ b/gas/testsuite/gas/loongarch/pseudo_op_option.s
@@ -0,0 +1,19 @@
+# Gas enables relax by default.
+# Push and pop can be nested, and each pop restores the options before
+# the most recent push.
+ .text
+.L1:
+ la.pcrel $a0,x
+
+ .option push
+ .option norelax
+ la.pcrel $a0,x
+
+ .option push
+ .option relax
+ la.pcrel $a0,x
+ .option pop
+
+ la.pcrel $a0,x
+ .option pop
+ la.pcrel $a0,x