mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-13 09:33:50 +00:00
Use thumb2 for ARM architectures V6T2 and later. Fix a bug in checking
for "thumb" and add a check for V6T2. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73905 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d32f5bf22d
commit
9170ab6685
@ -51,7 +51,7 @@ ARMSubtarget::ARMSubtarget(const Module &M, const std::string &FS,
|
||||
|
||||
if (Len >= 5 && TT.substr(0, 4) == "armv")
|
||||
Idx = 4;
|
||||
else if (Len >= 6 && TT.substr(0, 6) == "thumb") {
|
||||
else if (Len >= 6 && TT.substr(0, 5) == "thumb") {
|
||||
IsThumb = true;
|
||||
if (Len >= 7 && TT[5] == 'v')
|
||||
Idx = 6;
|
||||
@ -59,15 +59,19 @@ ARMSubtarget::ARMSubtarget(const Module &M, const std::string &FS,
|
||||
if (Idx) {
|
||||
unsigned SubVer = TT[Idx];
|
||||
if (SubVer > '4' && SubVer <= '9') {
|
||||
if (SubVer >= '7')
|
||||
if (SubVer >= '7') {
|
||||
ARMArchVersion = V7A;
|
||||
else if (SubVer == '6')
|
||||
} else if (SubVer == '6') {
|
||||
ARMArchVersion = V6;
|
||||
else if (SubVer == '5') {
|
||||
if (Len >= Idx+3 && TT[Idx+1] == 't' && TT[Idx+2] == '2')
|
||||
ARMArchVersion = V6T2;
|
||||
} else if (SubVer == '5') {
|
||||
ARMArchVersion = V5T;
|
||||
if (Len >= Idx+3 && TT[Idx+1] == 't' && TT[Idx+2] == 'e')
|
||||
ARMArchVersion = V5TE;
|
||||
}
|
||||
if (ARMArchVersion >= V6T2)
|
||||
ThumbMode = Thumb2;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user