]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
bpf: default to using pseudo-C assembly syntax by default
authorJose E. Marchesi <jose.marchesi@oracle.com>
Thu, 25 Apr 2024 14:53:49 +0000 (16:53 +0200)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Thu, 25 Apr 2024 15:33:45 +0000 (17:33 +0200)
At this point the kernel headers that almost all BPF programs use
contain pseudo-C inline assembly and having the GNU toolchain using
the conventional assembly syntax by default would force users to
specify the command-line option explicitly almost all of the time,
which is very inconvenient.

This patch changes GCC in order to recognize and generate the pseudo-C
assembly syntax of BPF by default.  The ASM_SPEC is adapted
accordingly, and in a way that the current release of the BPF
assembler (which still expects conventional assembler syntax by
default) does the right thing.

Tested in bpf-unknown-none-bpf target and x86_64-linux-gnu host.
No regressions.

gcc/ChangeLog

* config/bpf/bpf.opt: Use ASM_PSEUDOC for the default value of
-masm.
* config/bpf/bpf.h (ASM_SPEC): Adapt accordingly.
* doc/invoke.texi (eBPF Options): Update.

gcc/testsuite/ChangeLog

* gcc.target/bpf/alu-1.c: Specify conventional asm dialect.
* gcc.target/bpf/xbpf-indirect-call-1.c: Likewise.
* gcc.target/bpf/sync-fetch-and-add.c: Likewise.
* gcc.target/bpf/smov-2.c: Likewise.
* gcc.target/bpf/smov-1.c: Likewise.
* gcc.target/bpf/smod-1.c: Likewise.
* gcc.target/bpf/sload-1.c: Likewise.
* gcc.target/bpf/sdiv-1.c: Likewise.
* gcc.target/bpf/nop-1.c: Likewise.
* gcc.target/bpf/neg-1.c: Likewise.
* gcc.target/bpf/ldxdw.c: Likewise.
* gcc.target/bpf/jmp-1.c: Likewise.
* gcc.target/bpf/inline-memops-threshold-1.c: Likewise.
* gcc.target/bpf/float-1.c: Likewise.
* gcc.target/bpf/double-2.c: Likewise.
* gcc.target/bpf/double-1.c: Likewise.
* gcc.target/bpf/core-builtin-type-id.c: Likewise.
* gcc.target/bpf/core-builtin-type-based.c: Likewise.
* gcc.target/bpf/core-builtin-fieldinfo-size-1.c: Likewise.
* gcc.target/bpf/core-builtin-fieldinfo-sign-2.c: Likewise.
* gcc.target/bpf/core-builtin-fieldinfo-sign-1.c: Likewise.
* gcc.target/bpf/core-builtin-fieldinfo-rshift-2.c: Likewise.
* gcc.target/bpf/core-builtin-fieldinfo-rshift-1.c: Likewise.
* gcc.target/bpf/core-builtin-fieldinfo-offset-1.c: Likewise.
* gcc.target/bpf/core-builtin-fieldinfo-lshift-2.c: Likewise.
* gcc.target/bpf/core-builtin-fieldinfo-lshift-1-le.c: Likewise.
* gcc.target/bpf/core-builtin-fieldinfo-lshift-1-be.c: Likewise.
* gcc.target/bpf/core-builtin-fieldinfo-existence-1.c: Likewise.
* gcc.target/bpf/core-builtin-fieldinfo-errors-2.c: Likewise.
* gcc.target/bpf/core-builtin-fieldinfo-errors-1.c: Likewise.
* gcc.target/bpf/core-builtin-fieldinfo-const-elimination.c:
Likewise.
* gcc.target/bpf/core-builtin-exprlist-4.c: Likewise.
* gcc.target/bpf/core-builtin-exprlist-3.c: Likewise.
* gcc.target/bpf/core-builtin-exprlist-2.c: Likewise.
* gcc.target/bpf/core-builtin-exprlist-1.c: Likewise.
* gcc.target/bpf/core-builtin-enumvalue-opt.c: Likewise.
* gcc.target/bpf/core-builtin-enumvalue-errors.c: Likewise.
* gcc.target/bpf/core-builtin-enumvalue.c: Likewise.
* gcc.target/bpf/core-builtin-3.c: Likewise.
* gcc.target/bpf/core-builtin-2.c: Likewise.
* gcc.target/bpf/core-builtin-1.c: Likewise.
* gcc.target/bpf/core-attr-struct-as-array.c: Likewise.
* gcc.target/bpf/core-attr-6.c: Likewise.
* gcc.target/bpf/core-attr-5.c: Likewise.
* gcc.target/bpf/core-attr-4.c: Likewise.
* gcc.target/bpf/core-attr-3.c: Likewise.
* gcc.target/bpf/core-attr-2.c: Likewise.
* gcc.target/bpf/core-attr-1.c: Likewise.
* gcc.target/bpf/builtin-load.c: Likewise.
* gcc.target/bpf/btfext-funcinfo-nocore.c: Likewise.
* gcc.target/bpf/btfext-funcinfo.c: Likewise.
* gcc.target/bpf/bswap-1.c: Likewise.
* gcc.target/bpf/bswap-2.c: Likewise.
* gcc.target/bpf/attr-kernel-helper.c: Likewise.
* gcc.target/bpf/atomic-xchg-2.c: Likewise.
* gcc.target/bpf/atomic-xchg-1.c: Likewise.
* gcc.target/bpf/atomic-op-3.c: Likewise.
* gcc.target/bpf/atomic-op-2.c: Likewise.
* gcc.target/bpf/atomic-op-1.c: Likewise.
* gcc.target/bpf/atomic-fetch-op-3.c: Likewise.
* gcc.target/bpf/atomic-fetch-op-2.c: Likewise.
* gcc.target/bpf/atomic-fetch-op-1.c: Likewise.
* gcc.target/bpf/atomic-cmpxchg-2.c: Likewise.
* gcc.target/bpf/atomic-cmpxchg-1.c: Likewise.
* gcc.target/bpf/alu-2.c: Likewise.

68 files changed:
gcc/config/bpf/bpf.h
gcc/config/bpf/bpf.opt
gcc/doc/invoke.texi
gcc/testsuite/gcc.target/bpf/alu-1.c
gcc/testsuite/gcc.target/bpf/alu-2.c
gcc/testsuite/gcc.target/bpf/atomic-cmpxchg-1.c
gcc/testsuite/gcc.target/bpf/atomic-cmpxchg-2.c
gcc/testsuite/gcc.target/bpf/atomic-fetch-op-1.c
gcc/testsuite/gcc.target/bpf/atomic-fetch-op-2.c
gcc/testsuite/gcc.target/bpf/atomic-fetch-op-3.c
gcc/testsuite/gcc.target/bpf/atomic-op-1.c
gcc/testsuite/gcc.target/bpf/atomic-op-2.c
gcc/testsuite/gcc.target/bpf/atomic-op-3.c
gcc/testsuite/gcc.target/bpf/atomic-xchg-1.c
gcc/testsuite/gcc.target/bpf/atomic-xchg-2.c
gcc/testsuite/gcc.target/bpf/attr-kernel-helper.c
gcc/testsuite/gcc.target/bpf/bswap-1.c
gcc/testsuite/gcc.target/bpf/bswap-2.c
gcc/testsuite/gcc.target/bpf/btfext-funcinfo-nocore.c
gcc/testsuite/gcc.target/bpf/btfext-funcinfo.c
gcc/testsuite/gcc.target/bpf/builtin-load.c
gcc/testsuite/gcc.target/bpf/core-attr-1.c
gcc/testsuite/gcc.target/bpf/core-attr-2.c
gcc/testsuite/gcc.target/bpf/core-attr-3.c
gcc/testsuite/gcc.target/bpf/core-attr-4.c
gcc/testsuite/gcc.target/bpf/core-attr-5.c
gcc/testsuite/gcc.target/bpf/core-attr-6.c
gcc/testsuite/gcc.target/bpf/core-attr-struct-as-array.c
gcc/testsuite/gcc.target/bpf/core-builtin-1.c
gcc/testsuite/gcc.target/bpf/core-builtin-2.c
gcc/testsuite/gcc.target/bpf/core-builtin-3.c
gcc/testsuite/gcc.target/bpf/core-builtin-enumvalue-errors.c
gcc/testsuite/gcc.target/bpf/core-builtin-enumvalue-opt.c
gcc/testsuite/gcc.target/bpf/core-builtin-enumvalue.c
gcc/testsuite/gcc.target/bpf/core-builtin-exprlist-1.c
gcc/testsuite/gcc.target/bpf/core-builtin-exprlist-2.c
gcc/testsuite/gcc.target/bpf/core-builtin-exprlist-3.c
gcc/testsuite/gcc.target/bpf/core-builtin-exprlist-4.c
gcc/testsuite/gcc.target/bpf/core-builtin-fieldinfo-const-elimination.c
gcc/testsuite/gcc.target/bpf/core-builtin-fieldinfo-errors-1.c
gcc/testsuite/gcc.target/bpf/core-builtin-fieldinfo-errors-2.c
gcc/testsuite/gcc.target/bpf/core-builtin-fieldinfo-existence-1.c
gcc/testsuite/gcc.target/bpf/core-builtin-fieldinfo-lshift-1-be.c
gcc/testsuite/gcc.target/bpf/core-builtin-fieldinfo-lshift-1-le.c
gcc/testsuite/gcc.target/bpf/core-builtin-fieldinfo-lshift-2.c
gcc/testsuite/gcc.target/bpf/core-builtin-fieldinfo-offset-1.c
gcc/testsuite/gcc.target/bpf/core-builtin-fieldinfo-rshift-1.c
gcc/testsuite/gcc.target/bpf/core-builtin-fieldinfo-rshift-2.c
gcc/testsuite/gcc.target/bpf/core-builtin-fieldinfo-sign-1.c
gcc/testsuite/gcc.target/bpf/core-builtin-fieldinfo-sign-2.c
gcc/testsuite/gcc.target/bpf/core-builtin-fieldinfo-size-1.c
gcc/testsuite/gcc.target/bpf/core-builtin-type-based.c
gcc/testsuite/gcc.target/bpf/core-builtin-type-id.c
gcc/testsuite/gcc.target/bpf/double-1.c
gcc/testsuite/gcc.target/bpf/double-2.c
gcc/testsuite/gcc.target/bpf/float-1.c
gcc/testsuite/gcc.target/bpf/inline-memops-threshold-1.c
gcc/testsuite/gcc.target/bpf/jmp-1.c
gcc/testsuite/gcc.target/bpf/ldxdw.c
gcc/testsuite/gcc.target/bpf/neg-1.c
gcc/testsuite/gcc.target/bpf/nop-1.c
gcc/testsuite/gcc.target/bpf/sdiv-1.c
gcc/testsuite/gcc.target/bpf/sload-1.c
gcc/testsuite/gcc.target/bpf/smod-1.c
gcc/testsuite/gcc.target/bpf/smov-1.c
gcc/testsuite/gcc.target/bpf/smov-2.c
gcc/testsuite/gcc.target/bpf/sync-fetch-and-add.c
gcc/testsuite/gcc.target/bpf/xbpf-indirect-call-1.c

index 3cc5daa1b58dc4c775dd3504e25833fab0e029e9..c67e17526bfa3b61df80c3d9e7cab7cde6f74282 100644 (file)
@@ -23,7 +23,9 @@
 /**** Controlling the Compilation Driver.  */
 
 #define ASM_SPEC "%{mbig-endian:-EB} %{!mbig-endian:-EL} %{mxbpf:-mxbpf} " \
-  "%{masm=pseudoc:-mdialect=pseudoc}"
+  "%{masm=normal:-mdialect=normal} " \
+  "%{masm=pseudoc:-mdialect=pseudoc} " \
+  "%{!masm=normal:%{!masm=pseudoc:-mdialect=pseudoc}}"
 #define LINK_SPEC "%{mbig-endian:-EB} %{!mbig-endian:-EL}"
 #define LIB_SPEC ""
 #define STARTFILE_SPEC ""
index 541ebe4dfc4ed7d532f34194308cf5dc4edf23a5..62156e267990aa27c6543bc336858f3591758ce4 100644 (file)
@@ -96,7 +96,7 @@ EnumValue
 Enum(bpf_isa) String(v4) Value(ISA_V4)
 
 masm=
-Target RejectNegative Joined Var(asm_dialect) Enum(asm_dialect) Init(ASM_NORMAL)
+Target RejectNegative Joined Var(asm_dialect) Enum(asm_dialect) Init(ASM_PSEUDOC)
 Use given assembler dialect.
 
 Enum
index 27c31ab0c86bf35a85e4fcb2ac7784c1d57d1b74..8f0d6d30377f7c7a2e4a9a65d9b37b75f510ce98 100644 (file)
@@ -25753,7 +25753,7 @@ exit, respectively.
 @opindex masm=@var{dialect}
 @item -masm=@var{dialect}
 Outputs assembly instructions using eBPF selected @var{dialect}.  The default
-is @samp{normal}.
+is @samp{pseudoc}.
 
 Supported values for @var{dialect} are:
 
index 98149305e829bdc73aaeeb05669878f34e8270a5..be85a45178689f475362e8c0701083383e7040f8 100644 (file)
@@ -2,7 +2,7 @@
    not enabled.  */
 
 /* { dg-do compile } */
-/* { dg-options "-mno-alu32" } */
+/* { dg-options "-mno-alu32 -masm=normal" } */
 
 int foo (int a, int b)
 {
index 0444a9bc68a11db362d667eab10100b42eb07937..1a8f2af9b26efc904c15f12799bf375e6c9e9695 100644 (file)
@@ -1,6 +1,6 @@
 /* Check add and sub instructions.  */
 /* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-masm=normal" } */
 
 long foo (long x, long y)
 {
index 4bb6a7dba294e0d6f3312c56ffc71d2aa738317e..c0c85a2b321d0658e3c1502552cc6d9b49234ede 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-mv3-atomics -O2" } */
+/* { dg-options "-mv3-atomics -O2 -masm=normal" } */
 
 int
 foo (int *p, int *expected, int desired)
index 4036570ac6015f956741f56a7090d41c02c86163..c452e0385e3f6436829e38654557e4fa2c5d8510 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-mno-v3-atomics -O2" } */
+/* { dg-options "-mno-v3-atomics -O2 -masm=normal" } */
 
 int
 foo (int *p, int *expected, int desired)
index 533e955fe88353ddc70e62b5886f8a7109471e56..1013bcafc7ad4d07e34844d81f65d74c2f5e2862 100644 (file)
@@ -1,7 +1,7 @@
 /* Test 64-bit atomic-fetch-op instructions.  */
 
 /* { dg-do compile } */
-/* { dg-options "-mv3-atomics -O2" } */
+/* { dg-options "-mv3-atomics -O2 -masm=normal" } */
 
 long val;
 
index 6b9ee6348b518ea3a3b172b4be9aef55dffcba55..6fce8e9b69c934292142818558f64a42e407b08b 100644 (file)
@@ -1,7 +1,7 @@
 /* Test 32-bit atomic-fetch-op instructions.  */
 
 /* { dg-do compile } */
-/* { dg-options "-mv3-atomics -O2" } */
+/* { dg-options "-mv3-atomics -O2 -masm=normal" } */
 
 int val;
 
index 044a2f76474b8a086cb185f926766d0607c4e973..04f9e5dbfe9b04dd84a1d6e599459bf57816a806 100644 (file)
@@ -1,7 +1,7 @@
 /* Test atomic-fetch-op instructions are disabled with -mno-v3-atomics.  */
 
 /* { dg-do compile } */
-/* { dg-options "-mno-v3-atomics -O2" } */
+/* { dg-options "-mno-v3-atomics -O2 -masm=normal" } */
 
 long val;
 
index 453c0ed47ce01a8d0ec69f69a05cc8960edaefcd..5c87dcbffe62dbd015fca70251b0618ef1643230 100644 (file)
@@ -1,6 +1,6 @@
 /* Test 64-bit non-fetch atomic operations.  */
 /* { dg-do compile } */
-/* { dg-options "-mv3-atomics -O2" } */
+/* { dg-options "-mv3-atomics -O2 -masm=normal" } */
 
 long val;
 
index daacf42c00bf70437c9ff731207c097b21486ffa..8331d33465f8bbdd26731173d1db9434599d624d 100644 (file)
@@ -1,6 +1,6 @@
 /* Test 32-bit non-fetch atomic operations.  */
 /* { dg-do compile } */
-/* { dg-options "-mv3-atomics -O2" } */
+/* { dg-options "-mv3-atomics -O2 -masm=normal" } */
 
 int val;
 
index b2ce28926347b7956040f61b5e273fec6b657c6c..af5b607c093af455ad628c285b2f1202de0ac0f9 100644 (file)
@@ -1,6 +1,6 @@
 /* Test that atomic insns are properly disabled with -mno-v3-atomics.  */
 /* { dg-do compile } */
-/* { dg-options "-mno-v3-atomics -O2" } */
+/* { dg-options "-mno-v3-atomics -O2 -masm=normal" } */
 
 int val;
 
index bab806393dfdd20ee8a243319c53bc9149d87572..e8d4f14f36b1bb3d74f547150c0e7f588fbe7b3e 100644 (file)
@@ -1,6 +1,6 @@
 /* Test atomic exchange instruction.  */
 /* { dg-do compile } */
-/* { dg-options "-mv3-atomics -O2" } */
+/* { dg-options "-mv3-atomics -O2 -masm=normal" } */
 
 int foo (int *p, int *new)
 {
index 3b6324e966b85bd31613fb9000e7bcc022f52020..9cc56e05fb7f5b57b7bb624895a3eb735e0d784c 100644 (file)
@@ -1,6 +1,6 @@
 /* Test atomic exchange instruction is disabled with -mno-v3-atomics.  */
 /* { dg-do compile } */
-/* { dg-options "-mno-v3-atomics -O2" } */
+/* { dg-options "-mno-v3-atomics -O2 -masm=normal" } */
 
 int foo (int *p, int *new)
 {
index 7c5a0007c97934984480c8d760e4481bcf0d0f7e..40c541f0c752b7db9c5f3a9a7cef0c8b82841759 100644 (file)
@@ -1,7 +1,7 @@
 /* Basic test for kernel_helper attribute BTF information.  */
 
 /* { dg-do compile } */
-/* { dg-options "-O0 -dA -gbtf" } */
+/* { dg-options "-O0 -dA -gbtf -masm=normal" } */
 
 extern int foo_helper(int) __attribute((kernel_helper(42)));
 extern int foo_nohelper(int);
index ba19eb604859db1afe7890fefbacc2cf11674ca2..2203e426fd488ac607d3c8dd94aa22c0afd0f58a 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-mlittle-endian -mcpu=v3" } */
+/* { dg-options "-mlittle-endian -mcpu=v3 -masm=normal" } */
 
 unsigned short in16 = 0x1234U;
 unsigned int   in32 = 0x12345678U;
index e5aef3845d0cc9a7e4b0b9c37b2816ada81d15fd..9e5044efb94655d98e63c3ea4c7793baddf00dcd 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-mlittle-endian -mcpu=v4" } */
+/* { dg-options "-mlittle-endian -mcpu=v4 -masm=normal" } */
 
 unsigned short in16 = 0x1234U;
 unsigned int   in32 = 0x12345678U;
index 09d3acc8c2d48bea819237d0750aaa914ae936cb..e44facf4ef68192fc9dff708486d16ee28ca99d6 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -dA -gbtf -mno-co-re" } */
+/* { dg-options "-O2 -dA -gbtf -mno-co-re -masm=normal" } */
 
 struct T {
   int a;
index 6fdd14574ec416bad9e9c297350b44aef187cc7d..fbbefeae68f0e91335107039e571010a15460748 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -dA -gbtf" } */
+/* { dg-options "-O2 -dA -gbtf -masm=normal" } */
 
 struct T {
   int a;
index 0f93d91fb6fe25874d5136be577d8a56ff02d934..1f51d80079f552e49c213959fada07f970517a5f 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O0 -std=gnu99" } */
+/* { dg-options "-O0 -std=gnu99 -masm=normal" } */
 
 void foo ()
 {
index 1af9dc5ea6de990b1232f815a7ce85fde2fee03d..a9f153a85a1afb816e3bf0ee0b76c8fd9eb5084e 100644 (file)
@@ -2,7 +2,7 @@
    for BPF CO-RE support.  */
 
 /* { dg-do compile } */
-/* { dg-options "-O0 -dA -gbtf -mco-re" } */
+/* { dg-options "-O0 -dA -gbtf -mco-re -masm=normal" } */
 
 struct S {
   int a;
index 25c819a0082984942763a698cd0d7b830adec13d..b66e3c85614a300ec3069d198ddcfb282c376d0f 100644 (file)
@@ -2,7 +2,7 @@
    for BPF CO-RE support.  */
 
 /* { dg-do compile } */
-/* { dg-options "-O0 -dA -gbtf -mco-re" } */
+/* { dg-options "-O0 -dA -gbtf -mco-re -masm=normal" } */
 
 union U {
   int a;
index b46549f788c798bd6448def21e2498f02f34bcb9..12354fc6f86dcfea0fff508f09b541b0adb89617 100644 (file)
@@ -6,7 +6,7 @@
    generated.  */
 
 /* { dg-do compile } */
-/* { dg-options "-O0 -dA -gbtf -mco-re" } */
+/* { dg-options "-O0 -dA -gbtf -mco-re -masm=normal" } */
 
 struct O {
   int e;
index 9c0f966b556472c17945cd6927f0d48098e18b80..6f025f42f3eee8c5655dc673aea551981c1ecfde 100644 (file)
@@ -2,7 +2,7 @@
    LHS and both LHS and RHS of assignment.  */
 
 /* { dg-do compile } */
-/* { dg-options "-O0 -dA -gbtf -mco-re" } */
+/* { dg-options "-O0 -dA -gbtf -mco-re -masm=normal" } */
 
 struct T {
   int a;
index 90734dab3a296859b8149ef07950390b414d4c76..81e25fa85de7f311a9935d41ee3d05378ff9cfa9 100644 (file)
@@ -2,7 +2,7 @@
    LHS and both LHS and RHS of assignment.  */
 
 /* { dg-do compile } */
-/* { dg-options "-O2 -dA -gbtf -mco-re" } */
+/* { dg-options "-O2 -dA -gbtf -mco-re -masm=normal" } */
 
 struct U {
   int c;
index d0c5371b86e03e416312598cd35c5c798ac39d6c..25215b5ae376d191a2d1e0597508a2f7e7bbec42 100644 (file)
@@ -2,7 +2,7 @@
    LHS and both LHS and RHS of assignment.  */
 
 /* { dg-do compile } */
-/* { dg-options "-O2 -dA -gbtf -mco-re" } */
+/* { dg-options "-O2 -dA -gbtf -mco-re -masm=normal" } */
 
 struct U {
   int c;
index 3f6eb9cb97f857ceea5600f7224ac861dfaf4812..e34eb3c39befb06a8c4fdf285f7b34a8d7f44343 100644 (file)
@@ -2,7 +2,7 @@
    for BPF CO-RE support.  */
 
 /* { dg-do compile } */
-/* { dg-options "-O0 -dA -gbtf -mco-re" } */
+/* { dg-options "-O0 -dA -gbtf -mco-re -masm=normal" } */
 
 struct S {
   int a;
index 3f15980a4c787018af1f93b360ccfcc88837ad0e..b4f9998afb8f9b03c5292ce6e82b5cc4d1b6b997 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O0 -dA -gbtf -mco-re" } */
+/* { dg-options "-O0 -dA -gbtf -mco-re -masm=normal" } */
 
 struct S {
   int a;
index c9ec8994ae3bfa6906799b187b6a93a09ef4ecce..b72e2566b71026f807f029aca3e8a70531333546 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O0 -dA -gbtf -mco-re" } */
+/* { dg-options "-O0 -dA -gbtf -mco-re -masm=normal" } */
 
 struct S {
   int a;
index 190ec2657d3c962fc223cc521a2b516ffa1daf7b..251b08ffcd4aa2b05db0cfe9b2c2e2dfd3c77d5e 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O0 -dA -gbtf -mco-re" } */
+/* { dg-options "-O0 -dA -gbtf -mco-re -masm=normal" } */
 
 struct T {
   int a;
index 138e9989516013cc299dcaae6108b6cab721ffa8..65d74f3b9b23fad1a4978f2e8e6b1053b63c7f59 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O0 -dA -gbtf -mco-re" } */
+/* { dg-options "-O0 -dA -gbtf -mco-re -masm=normal" } */
 
 #include "core-support.h"
 
index fc3c299fe9cbeec4665b89629789069095e82583..0b87c8d39fe211dfc9495f7d7a1cb21f00645c59 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -dA -gbtf -mco-re" } */
+/* { dg-options "-O2 -dA -gbtf -mco-re -masm=normal" } */
 
 #include "core-support.h"
 
index 23dfd8a10bf6d6caa19735ee276ff071eb490729..ceb9987c0d6c4cf429c9b71acf7df1f3ef957f83 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O0 -dA -gbtf -mco-re" } */
+/* { dg-options "-O0 -dA -gbtf -mco-re -masm=normal" } */
 
 #include "core-support.h"
 
index b8bdeeaa125c4536c6f6e36a9d0f11d24b1205cf..8ce4a6e70de7e478bc6127a6db75a8ab1ad07cce 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O0 -dA -gbtf -mco-re" } */
+/* { dg-options "-O0 -dA -gbtf -mco-re -masm=normal" } */
 
 struct S {
   int a;
index 3a22b99f8e6fdc48a293a27209fa857c0c7b3da4..e8ae4c82e21c0b35837cbe4183c4d4a3d1b60df9 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O0 -dA -gbtf -mco-re" } */
+/* { dg-options "-O0 -dA -gbtf -mco-re -masm=normal" } */
 
 struct T {
   int a;
index bccf2b3a69680c435fc880877c29c6aff033af09..313f2a7202ed4389805d71641f7e5c34a0f02e4a 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O0 -dA -gbtf -mco-re" } */
+/* { dg-options "-O0 -dA -gbtf -mco-re -masm=normal" } */
 
 struct T {
   int a;
index 8ef239c30c15a7e93fcef7b741f3d0cb6191a9f6..6884c31f86ec8fb3c6632c5619c95f4ea7bb90f5 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O0 -dA -gbtf -mco-re" } */
+/* { dg-options "-O0 -dA -gbtf -mco-re -masm=normal" } */
 
 struct T {
   int a;
index 51e938c8aac3de5bfdb2ce0a0b996c5c7cc42e0a..1cda6badea532f2e853ca9fac09157ffa0854fbc 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -dA -gbtf -mco-re" } */
+/* { dg-options "-O2 -dA -gbtf -mco-re -masm=normal" } */
 
 struct S {
   unsigned int a1: 7;
index 6f8c320ab8b6537556e74076674a3afd34d2644a..8eb24ded84caa63d42a467d7efbf359863d111c3 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O0 -dA -gbtf -mco-re" } */
+/* { dg-options "-O0 -dA -gbtf -mco-re -masm=normal" } */
 
 struct F {
   int bar;
index 08fbdf0165534117b6c6609eb0027564ab9efb09..b57b1479b6e7d9a5d4806ef5ba7988fd3389a970 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O0 -dA -gbtf -mco-re" } */
+/* { dg-options "-O0 -dA -gbtf -mco-re -masm=normal" } */
 
 struct F {
   int bar;
index 96119daf7b23037272ee51b3a2083858dcc96904..8e775dc8049d5e938387e9a71a52646f30ee3928 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O0 -dA -gbtf -mco-re" } */
+/* { dg-options "-O0 -dA -gbtf -mco-re -masm=normal" } */
 
 enum {
   FIELD_EXISTENCE = 2,
index 579bc769b8242398fb8c1ff4a00578a1ee35dec0..10f8abf2fb30a30f73f612f17ae12fd6e086263f 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O0 -dA -gbtf -mco-re -mbig-endian" } */
+/* { dg-options "-O0 -dA -gbtf -mco-re -mbig-endian -masm=normal" } */
 
 struct S {
   int x1: 6;
index d48f01ae522220268213f53a7eb06469b961a50e..57e390771bd79822e287041f7148ce9dbc7fee5c 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O0 -dA -gbtf -mco-re -mlittle-endian" } */
+/* { dg-options "-O0 -dA -gbtf -mco-re -mlittle-endian -masm=normal" } */
 
 struct S {
   int x1: 6;
index 653ddf65e56de77570da7fe4999aee11c9b57462..46db09aed1a16da8c38747db289df6a3d9a309c5 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O0 -dA -gbtf -mco-re" } */
+/* { dg-options "-O0 -dA -gbtf -mco-re -masm=normal" } */
 
 struct S {
   char c;
index a0ddda83a0729d5d489feea157f58a58ad38fd09..7a6a9dec92491ab778251e9e541c553e918fef81 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O0 -dA -gbtf -mco-re" } */
+/* { dg-options "-O0 -dA -gbtf -mco-re -masm=normal" } */
 
 struct S {
   unsigned int a1: 7;
index 477678322726f5731f8d747134df8a651e255f2a..1b6d150aa2a9210433d544866b3c2fc65b7b59be 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O0 -dA -gbtf -mco-re" } */
+/* { dg-options "-O0 -dA -gbtf -mco-re -masm=normal" } */
 
 struct S {
   int x1: 6;
index a13ff8e261eb08a2c1b78532fd5bcf1325edeb0f..106b686375ac9592afb1e0596a48f32ebc5e43a6 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O0 -dA -gbtf -mco-re" } */
+/* { dg-options "-O0 -dA -gbtf -mco-re -masm=normal" } */
 
 struct S {
   int x;
index 442ed076aa92a74388033e7bcdefb444e657f300..f32f116a5b7d15d5b70893e0e9157e62469fbcc7 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O0 -dA -gbtf -mco-re" } */
+/* { dg-options "-O0 -dA -gbtf -mco-re -masm=normal" } */
 
 enum {
   FIELD_SIGNEDNESS = 3,
index cdc4d4db35d66365211e642f7da5f9b1537c0bd1..f28915e25ccbb07ce62ba04e83483543389731e1 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O0 -dA -gbtf -mco-re" } */
+/* { dg-options "-O0 -dA -gbtf -mco-re -masm=normal" } */
 
 enum {
   FIELD_SIGNEDNESS = 3,
index 74707f1cb7d5b2848f1014f08f317615785b16de..12d3643bd1d67d6b17a741cb148f6a34f8e38587 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O0 -dA -gbtf -mco-re" } */
+/* { dg-options "-O0 -dA -gbtf -mco-re -masm=normal" } */
 
 struct S {
   unsigned int a1: 7;
index 9d818133c084c67fd2586f643e506ce0a7596958..8f0ccfc0f1fe4af58d16acfb9b30fed0eefd35ed 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O0 -dA -gbtf -mco-re" } */
+/* { dg-options "-O0 -dA -gbtf -mco-re -masm=normal" } */
 
 #include "core-support.h"
 
index 9576b91bc940015966c833d1b7562f5dc7e26ff6..cb0ee1ff6c9a3dcc23d9041634c993a85e1cec97 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O0 -dA -gbtf -mco-re" } */
+/* { dg-options "-O0 -dA -gbtf -mco-re -masm=normal" } */
 
 #include "core-support.h"
 
index 200f1bd18f803a3fbc5ae0c8c1ffc01c43f31455..ae5d34c4bc2bf17ca781efd2c6b49aed932dd97e 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-mlittle-endian" } */
+/* { dg-options "-mlittle-endian -masm=normal" } */
 
 double f;
 double a() { f = 1.0; return 1.0; }
index d04ddd0c575c2a6a9029b19b05365a315883ef81..d87a65c2d913b5ad4a9abbb6ff084f9ab5af087c 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-mbig-endian" } */
+/* { dg-options "-mbig-endian -masm=normal" } */
 
 double f;
 double a() { f = 1.0; return 1.0; }
index 05ed7bb651d7990ea047453727ac11e43292d015..ccfb9c44f6265175c6b2dc1deb3662c00cd47b3a 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-mlittle-endian" } */
+/* { dg-options "-mlittle-endian -masm=normal" } */
 
 float f;
 float a() { f = 1.0; return 1.0; }
index c2ba4db5b7bd28042a0e8a6f213c722eb538eec8..d4ffc5b7f11725500d8e0b518601def4b31bf752 100644 (file)
@@ -1,6 +1,6 @@
 
 /* { dg-do compile } */
-/* { dg-options "-O2" "-minline-memops-threshold=256"} */
+/* { dg-options "-O2 -masm=normal -minline-memops-threshold=256" } */
 
 char buf[512];
 
index eaf825395efe9803cbeff41404e60b1777cdc624..1fa7307ee0b91a4996aeda38f4a039e78fb116b3 100644 (file)
@@ -3,7 +3,7 @@
    if -mjmp32 is not enabled.  */
 
 /* { dg-do compile } */
-/* { dg-options "-mno-jmpext -mno-jmp32" } */
+/* { dg-options "-mno-jmpext -mno-jmp32 -masm=normal" } */
 
 int foo (int a, int b)
 {
index 72db8f033248867181775e0464296a96348ebf4c..91f2f55ab9163b62c6f144c40d907a6b9cacdca4 100644 (file)
@@ -2,7 +2,7 @@
    with a constant instead of register + offset.  */
 
 /* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -masm=normal" } */
 
 /* { dg-final { scan-assembler-times "ldxdw\t%r.,\\\[%r.\\+\[0-9\]+\\\]" 1 } } */
 /* { dg-final { scan-assembler-not "ldxdw\t%r.,\[0-9\]+" } } */
index 9ffb956859d0f2ef46b72e58f6046495eba8e7bb..7acc0cab553d649e8e722c03b0c92159c3f5979e 100644 (file)
@@ -1,7 +1,7 @@
 /* Check negr and negr32 instructions.  */
 
 /* { dg-do compile } */
-/* { dg-options "-malu32" } */
+/* { dg-options "-malu32 -masm=normal" } */
 
 long foo (long a, long b, int x, int y)
 {
index c4d274f6badbd670ddce83a392edca25196dd0b2..06914dd10b93c51c0d8a62caffb7c394defc1e74 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99 --patchable-function-entry=2,1" } */
+/* { dg-options "-std=gnu99 --patchable-function-entry=2,1 -masm=normal" } */
 
 /* The purpose of this test is to make sure the right instruction is
    generated for NOPs.  See bpf.md for a description on why this is
index ad75b044e1d06917b077065dab29de6dda7aa292..a1e51618ee641d0719a4a6ad6268ff131ba63d6f 100644 (file)
@@ -1,6 +1,6 @@
 /* Verify that sdiv instruction is used for xBPF. */
 /* { dg-do compile } */
-/* { dg-options "-O0 -mcpu=v4" } */
+/* { dg-options "-O0 -mcpu=v4 -masm=normal" } */
 
 void
 foo ()
index d85822932d3bf93629c46d455cea63291b57b62e..d1dd5b7f4d72bf55d714159bf64970e66dce8499 100644 (file)
@@ -1,6 +1,6 @@
 /* Check ISA V4 signed load instructions.  */
 /* { dg-do compile } */
-/* { dg-options "-mcpu=v4 -O2" } */
+/* { dg-options "-mcpu=v4 -O2 -masm=normal" } */
 
 long foo (char *p1, short *p2, int *p3)
 {
index c5fc6f7d4b20140b16c89714e92e24327f48633f..5be0bf2856d7767ec619cc27cb7dacdb71645bca 100644 (file)
@@ -1,6 +1,6 @@
 /* Verify that smod instruction is used for xBPF. */
 /* { dg-do compile } */
-/* { dg-options "-O0 -mcpu=v4" } */
+/* { dg-options "-O0 -mcpu=v4 -masm=normal" } */
 
 void
 foo ()
index ec17ad06fd2f2b6ced97c940441c586c8f25012c..49109a80e3e8b26cbd2af617a130371d09466074 100644 (file)
@@ -1,6 +1,6 @@
 /* Check signed mov instructions.  */
 /* { dg-do compile } */
-/* { dg-options "-mcpu=v4 -O2" } */
+/* { dg-options "-mcpu=v4 -O2 -masm=normal" } */
 
 long
 foo (char a, short b, int c, unsigned long d)
index 6f3516d23853685fc147b33813afcdbb7aa79ee0..2f477ec2819dea61074e95e84b9872cb99d0e6c8 100644 (file)
@@ -1,6 +1,6 @@
 /* Check signed 32-bit mov instructions.  */
 /* { dg-do compile } */
-/* { dg-options "-mcpu=v4 -O2" } */
+/* { dg-options "-mcpu=v4 -O2 -masm=normal" } */
 
 int
 foo (unsigned char a, unsigned short b)
index 69949f14d0ca780d894cb64338fd45f413260a3e..6902aabd337947dd19334e8bf919d9863a0f2832 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-options "-masm=normal" } */
 
 long delta;
 long *val;
index dc4b3cfb12dc787f8841c51aa24315c5af9789aa..f8ef3fa3178b825f0857af0ef88cbb09dc14bc88 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-mxbpf" } */
+/* { dg-options "-mxbpf -masm=normal" } */
 
 /* GCC should generate an indirect call instruction (call %REG)
    when targetting xBPF.  */