]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
x86: testsuite: scfi: adjust COFI testcase and gas: scfi: untraceable control flow...
authorIndu Bhagat <indu.bhagat@oracle.com>
Mon, 29 Jan 2024 14:22:06 +0000 (14:22 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 29 Jan 2024 14:22:06 +0000 (14:22 +0000)
gas/ginsn.c
gas/testsuite/gas/scfi/x86_64/scfi-cofi-1.d [deleted file]
gas/testsuite/gas/scfi/x86_64/scfi-cofi-1.l [deleted file]
gas/testsuite/gas/scfi/x86_64/scfi-cofi-1.s [deleted file]
gas/testsuite/gas/scfi/x86_64/scfi-unsupported-cfg-1.l
gas/testsuite/gas/scfi/x86_64/scfi-x86-64.exp

index 5f6a67ce4f2b7554c8dc97a9f7352c45a2e53f8e..661f51d23c59f732140c8f828b61d4126e9a6e4b 100644 (file)
@@ -1161,8 +1161,8 @@ ginsn_data_end (const symbolS *label)
   /* Build the cfg of ginsn(s) of the function.  */
   if (!frchain_now->frch_ginsn_data->gcfg_apt_p)
     {
-      as_warn (_("Untraceable control flow for func '%s'; Skipping SCFI"),
-              S_GET_NAME (func));
+      as_bad (_("untraceable control flow for func '%s'"),
+             S_GET_NAME (func));
       goto end;
     }
 
diff --git a/gas/testsuite/gas/scfi/x86_64/scfi-cofi-1.d b/gas/testsuite/gas/scfi/x86_64/scfi-cofi-1.d
deleted file mode 100644 (file)
index 53cc124..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#as: --scfi=experimental -W
-#objdump: -Wf
-#name: Synthesize CFI for add insn
-
-#pass
diff --git a/gas/testsuite/gas/scfi/x86_64/scfi-cofi-1.l b/gas/testsuite/gas/scfi/x86_64/scfi-cofi-1.l
deleted file mode 100644 (file)
index 61c29da..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-.*Assembler messages:
-.*12: Warning: SCFI ignores most user-specified CFI directives
-.*24: Warning: Untraceable control flow for func 'foo'; Skipping SCFI
diff --git a/gas/testsuite/gas/scfi/x86_64/scfi-cofi-1.s b/gas/testsuite/gas/scfi/x86_64/scfi-cofi-1.s
deleted file mode 100644 (file)
index 0ea32d4..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-# Testcase with a variety of "change of flow instructions"
-#
-# Must be run with -W so it remains warning free.
-#
-# This test does not have much going on wrt synthesis of CFI;
-# it just aims to ensure x8_64 -> ginsn decoding behaves
-# gracefully for these "change of flow instructions"
-       .text
-       .globl  foo
-       .type   foo, @function
-foo:
-       .cfi_startproc
-       addq    %rdx, %rax
-       loop    foo
-       notrack jmp     *%rax
-       call    *%r8
-       jecxz   .L179
-       jmp     *48(%rdi)
-       jo      .L179
-.L179:
-       ret
-       .cfi_endproc
-.LFE0:
-       .size   foo, .-foo
index 1e138a102fe8b87cf98a8335908e8845462af280..c59ba93df45a1f18f900ffa1c66c2c737c35bdec 100644 (file)
@@ -1,3 +1,3 @@
 .*Assembler messages:
 .*50: Warning: SCFI ignores most user-specified CFI directives
-.*52: Warning: Untraceable control flow for func 'foo'; Skipping SCFI
+.*52: Error: untraceable control flow for func 'foo'
index 2b291800b6519636201798b63fbd53e1f6ed5b38..9005c47d789de1f30b7e99fa5b381b4f55ff7f5b 100644 (file)
@@ -28,6 +28,7 @@ if  { ([istarget "x86_64-*-*"] && ![istarget "x86_64-*-linux*-gnux32"]) } then {
     run_list_test "ginsn-add-1" "--scfi=experimental -ali"
     run_list_test "ginsn-pop-1" "--scfi=experimental -ali"
     run_list_test "ginsn-push-1" "--scfi=experimental -ali"
+    run_list_test "ginsn-cofi-1" "--scfi=experimental -ali -W"
 
     run_dump_test "scfi-cfi-label-1"
     run_list_test "scfi-cfi-label-1" "--scfi=experimental --warn"
@@ -67,8 +68,6 @@ if  { ([istarget "x86_64-*-*"] && ![istarget "x86_64-*-linux*-gnux32"]) } then {
     run_dump_test "scfi-pushsection-2"
     run_list_test "scfi-pushsection-2" "--scfi=experimental --warn"
 
-    run_dump_test "scfi-cofi-1"
-    run_list_test "scfi-cofi-1" "--scfi=experimental --warn"
     run_dump_test "scfi-sub-1"
     run_list_test "scfi-sub-1" "--scfi=experimental --warn"
     run_dump_test "scfi-sub-2"