mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-09 13:55:22 +00:00
Unaligned access is supported on ARMv6 and ARMv7 for the NetBSD target.
Patch from Matt Thomas. llvm-svn: 200654
This commit is contained in:
parent
fb04fa4513
commit
8167427585
@ -237,9 +237,10 @@ void ARMSubtarget::resetSubtargetFeatures(StringRef CPU, StringRef FS) {
|
||||
// Linux targets support unaligned accesses. The same goes for NaCl.
|
||||
//
|
||||
// The above behavior is consistent with GCC.
|
||||
AllowsUnalignedMem = (
|
||||
(hasV7Ops() && (isTargetLinux() || isTargetNaCl())) ||
|
||||
(hasV6Ops() && isTargetMachO()));
|
||||
AllowsUnalignedMem =
|
||||
(hasV7Ops() && (isTargetLinux() || isTargetNaCl() ||
|
||||
isTargetNetBSD())) ||
|
||||
(hasV6Ops() && (isTargetMachO() || isTargetNetBSD()));
|
||||
break;
|
||||
case StrictAlign:
|
||||
AllowsUnalignedMem = false;
|
||||
|
@ -311,6 +311,9 @@ public:
|
||||
bool isTargetDarwin() const { return TargetTriple.isOSDarwin(); }
|
||||
bool isTargetNaCl() const { return TargetTriple.isOSNaCl(); }
|
||||
bool isTargetLinux() const { return TargetTriple.isOSLinux(); }
|
||||
bool isTargetNetBSD() const {
|
||||
return TargetTriple.getOS() == Triple::NetBSD;
|
||||
}
|
||||
|
||||
bool isTargetELF() const { return TargetTriple.isOSBinFormatELF(); }
|
||||
bool isTargetMachO() const { return TargetTriple.isOSBinFormatMachO(); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user