diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-07-04 17:26:41 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-07-04 17:26:41 +0200 |
commit | ffd3e55cfd12a3559621e3130d613d319243512d (patch) | |
tree | 1144d0e2ce3c55952cb06ac4a7642765a74372eb /module/system/base | |
parent | d40752513fff3306bed31e40721e627720b2f8ff (diff) |
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.
Diffstat (limited to 'module/system/base')
-rw-r--r-- | module/system/base/target.scm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/module/system/base/target.scm b/module/system/base/target.scm index cefa951a3..31e3fea79 100644 --- a/module/system/base/target.scm +++ b/module/system/base/target.scm @@ -72,7 +72,13 @@ (endianness big)) ((string-match "^arm.*el" cpu) (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)) (else (error "unknown CPU endianness" cpu))))) @@ -97,7 +103,7 @@ ((string-match "^x86_64-.*-gnux32" triplet) 4) ; x32 ((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) ((string-match "^arm.*" cpu) 4) (else (error "unknown CPU word size" cpu))))) |