mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 11:50:28 +02:00
Recognize more ARM targets.
Suggested by Dale P. Smith. * module/system/base/target.scm (cpu-endianness): Add cases for "arm.*eb", "^aarch64.*be", and "aarch64". Change "arm" case to "arm.*". (triplet-pointer-size): Allow underscore as in 'aarch64_be'. * test-suite/tests/asm-to-bytecode.test ("cross-compilation")["armeb-unknown-linux-gnu", "aarch64-linux-gnu", "aarch64_be-linux-gnu"]: New tests.
This commit is contained in:
parent
d40752513f
commit
ffd3e55cfd
2 changed files with 14 additions and 2 deletions
|
@ -72,7 +72,13 @@
|
||||||
(endianness big))
|
(endianness big))
|
||||||
((string-match "^arm.*el" cpu)
|
((string-match "^arm.*el" cpu)
|
||||||
(endianness little))
|
(endianness little))
|
||||||
((string=? "arm" cpu) ;ARMs are LE by default
|
((string-match "^arm.*eb" cpu)
|
||||||
|
(endianness big))
|
||||||
|
((string-prefix? "arm" cpu) ;ARMs are LE by default
|
||||||
|
(endianness little))
|
||||||
|
((string-match "^aarch64.*be" cpu)
|
||||||
|
(endianness big))
|
||||||
|
((string=? "aarch64" cpu)
|
||||||
(endianness little))
|
(endianness little))
|
||||||
(else
|
(else
|
||||||
(error "unknown CPU endianness" cpu)))))
|
(error "unknown CPU endianness" cpu)))))
|
||||||
|
@ -97,7 +103,7 @@
|
||||||
((string-match "^x86_64-.*-gnux32" triplet) 4) ; x32
|
((string-match "^x86_64-.*-gnux32" triplet) 4) ; x32
|
||||||
|
|
||||||
((string-match "64$" cpu) 8)
|
((string-match "64$" cpu) 8)
|
||||||
((string-match "64[lbe][lbe]$" cpu) 8)
|
((string-match "64_?[lbe][lbe]$" cpu) 8)
|
||||||
((member cpu '("sparc" "powerpc" "mips" "mipsel")) 4)
|
((member cpu '("sparc" "powerpc" "mips" "mipsel")) 4)
|
||||||
((string-match "^arm.*" cpu) 4)
|
((string-match "^arm.*" cpu) 4)
|
||||||
(else (error "unknown CPU word size" cpu)))))
|
(else (error "unknown CPU word size" cpu)))))
|
||||||
|
|
|
@ -207,6 +207,12 @@
|
||||||
|
|
||||||
(test-target "arm-unknown-linux-androideabi"
|
(test-target "arm-unknown-linux-androideabi"
|
||||||
(endianness little) 4)
|
(endianness little) 4)
|
||||||
|
(test-target "armeb-unknown-linux-gnu"
|
||||||
|
(endianness big) 4)
|
||||||
|
(test-target "aarch64-linux-gnu"
|
||||||
|
(endianness little) 8)
|
||||||
|
(test-target "aarch64_be-linux-gnu"
|
||||||
|
(endianness big) 8)
|
||||||
|
|
||||||
(pass-if-exception "unknown target"
|
(pass-if-exception "unknown target"
|
||||||
exception:miscellaneous-error
|
exception:miscellaneous-error
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue