[PATCH,V4 13/14] gas: testsuite: add a x86_64 testsuite for SCFI

Jan Beulich jbeulich@suse.com
Mon Jan 8 08:11:12 GMT 2024


On 05.01.2024 23:29, Indu Bhagat wrote:
> On 1/5/24 06:22, Jan Beulich wrote:
>> On 03.01.2024 08:15, Indu Bhagat wrote:
>>> +# common tests
>>> +if  { ([istarget "x86_64-*-*"]) } then {
>>> +
>>> +    global ASFLAGS
>>> +    set old_ASFLAGS "$ASFLAGS"
>>> +
>>> +    run_list_test "ginsn-dw2-regnum-1" "--scfi -ali"
>>> +    run_list_test "ginsn-add-1" "--scfi -ali"
>>> +    run_list_test "ginsn-pop-1" "--scfi -ali"
>>> +    run_list_test "ginsn-push-1" "--scfi -ali"
>>> +
>>> +    run_dump_test "scfi-cfi-label-1"
>>> +    run_list_test "scfi-cfi-label-1" "--scfi --warn"
>>
>> Starting here, where is it that you also check CFI generated from
>> the directives? Also, why does each source need assembling twice?
>> Can't you check for the diagnostics right in the "dump" tests?
>>
> 
> Its the run_dump_test which runs each test with and without --scfi. 
> E.g., in scfi-selfalign-func-1.d, we see:
> 
> #as: --scfi -W
> #as:
> #objdump: --sframe
> 
> Checking for warning in dump tests does not look possible as there will 
> be warning (Warning: --scfi=all ignores most user-specified CFI 
> directives) in only one case (#as: --scfi) and not the other (#as: ).

Oh, I see, I'm sorry for not paying enough attention. One could probably
trick things, but quite likely that's not worth it.

> I thought checking for warnings explicitly may help in catching problems 
> as the implementation evolves.

Maybe, yes.

Jan


More information about the Binutils mailing list