mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-20 14:29:27 +00:00
64-bit bugfix: 0xFFFF0000 cannot be formed with a single lis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28880 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f27bb6de10
commit
dd58343857
@ -143,7 +143,11 @@ def immZExt16 : PatLeaf<(imm), [{
|
||||
def imm16Shifted : PatLeaf<(imm), [{
|
||||
// imm16Shifted predicate - True if only bits in the top 16-bits of the
|
||||
// immediate are set. Used by instructions like 'addis'.
|
||||
return ((unsigned)N->getValue() & 0xFFFF0000U) == (unsigned)N->getValue();
|
||||
if (N->getValue() & 0xFFFF) return false;
|
||||
if (N->getValueType(0) == MVT::i32)
|
||||
return true;
|
||||
// For 64-bit, make sure it is sext right.
|
||||
return N->getValue() == (uint64_t)(int)N->getValue();
|
||||
}], HI16>;
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user