mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-01-09 21:21:16 +00:00
[Sparc] Emit large negative adjustments to SP/FP with sethi+xor instead of sethi+or. This generates correct code for both sparc32 and sparc64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195576 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -105,5 +105,22 @@ namespace llvm {
|
||||
}
|
||||
llvm_unreachable("Invalid cond code");
|
||||
}
|
||||
|
||||
inline static unsigned HI22(int64_t imm) {
|
||||
return (unsigned)((imm >> 10) & ((1 << 22)-1));
|
||||
}
|
||||
|
||||
inline static unsigned LO10(int64_t imm) {
|
||||
return (unsigned)(imm & 0x3FF);
|
||||
}
|
||||
|
||||
inline static unsigned HIX22(int64_t imm) {
|
||||
return HI22(~imm);
|
||||
}
|
||||
|
||||
inline static unsigned LOX10(int64_t imm) {
|
||||
return ~LO10(~imm);
|
||||
}
|
||||
|
||||
} // end namespace llvm
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user