diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2021-11-15 10:24:27 +0100 |
---|---|---|
committer | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2021-11-15 10:24:27 +0100 |
commit | a91f844ef449d0dd1cf2e0e47b0ade0d8a6304e1 (patch) | |
tree | 6b21fa48461637fb4f2d627f7884aedd0b052ae5 /libffi | |
parent | testsuite: i386: Require dfp in gcc.target/i386/pr101346.c (diff) | |
download | gcc-a91f844ef449d0dd1cf2e0e47b0ade0d8a6304e1.tar.gz gcc-a91f844ef449d0dd1cf2e0e47b0ade0d8a6304e1.tar.bz2 gcc-a91f844ef449d0dd1cf2e0e47b0ade0d8a6304e1.tar.xz |
libffi: Use #define instead of .macro in src/x86/win64.S [PR102874]
The libffi 3.4.2 import badly broke Solaris/x86 bootstrap with the native
assembler:
Assembler:
"/vol/gcc/src/hg/master/local/libffi/src/x86/win64.S", line 88 :
Illegal mnemonic
Near line: ".macro epilogue"
"/vol/gcc/src/hg/master/local/libffi/src/x86/win64.S", line 88 : Syntax
error
Near line: ".macro epilogue"
"/vol/gcc/src/hg/master/local/libffi/src/x86/win64.S", line 95 :
Illegal mnemonic
Near line: ".endm"
"/vol/gcc/src/hg/master/local/libffi/src/x86/win64.S", line 95 : Syntax
error
Near line: ".endm"
"/vol/gcc/src/hg/master/local/libffi/src/x86/win64.S", line 100 :
Illegal mnemonic
Near line: " epilogue"
"/vol/gcc/src/hg/master/local/libffi/src/x86/win64.S", line 100 :
Syntax error
Near line: "epilogue"
Solaris as doesn't support .macro/.endm.
Fixed by using #define instead of the unportable .macro.
Tested on i386-pc-solaris2.11 and x86_64-pc-linux-gnu.
The bug has been reported upstream
(https://github.com/libffi/libffi/issues/665); a corresponding pull
request is also pending (https://github.com/libffi/libffi/pull/669).
2021-10-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
libffi:
PR libffi/102874
* src/x86/win64.S (epilogue): Use #define instead of .macro.
Diffstat (limited to 'libffi')
-rw-r--r-- | libffi/src/x86/win64.S | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libffi/src/x86/win64.S b/libffi/src/x86/win64.S index f3ace8d0773..58ec6a155e3 100644 --- a/libffi/src/x86/win64.S +++ b/libffi/src/x86/win64.S | |||
@@ -85,14 +85,13 @@ C(ffi_call_win64): | |||
85 | 85 | ||
86 | /* Below, we're space constrained most of the time. Thus we eschew the | 86 | /* Below, we're space constrained most of the time. Thus we eschew the |
87 | modern "mov, pop, ret" sequence (5 bytes) for "leave, ret" (2 bytes). */ | 87 | modern "mov, pop, ret" sequence (5 bytes) for "leave, ret" (2 bytes). */ |
88 | .macro epilogue | 88 | #define epilogue \ |
89 | leaveq | 89 | leaveq; \ |
90 | cfi_remember_state | 90 | cfi_remember_state; \ |
91 | cfi_def_cfa(%rsp, 8) | 91 | cfi_def_cfa(%rsp, 8); \ |
92 | cfi_restore(%rbp) | 92 | cfi_restore(%rbp); \ |
93 | ret | 93 | ret; \ |
94 | cfi_restore_state | 94 | cfi_restore_state |
95 | .endm | ||
96 | 95 | ||
97 | .align 8 | 96 | .align 8 |
98 | 0: | 97 | 0: |