mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 02:29:18 +00:00
Don't use plain INC32 and DEC32 on x86-64; it needs
INC64_32r and INC64_16r, because these instructions are encoded differently on x86-64. This fixes JIT regressions on x86-64 in kimwitu++ and others. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66207 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
51bb47480e
commit
1f4af262d5
@ -1730,6 +1730,28 @@ def : Pat<(parallel (X86smul_flag (loadi64 addr:$src1), i64immSExt32:$src2),
|
|||||||
(IMUL64rmi32 addr:$src1, i64immSExt32:$src2)>;
|
(IMUL64rmi32 addr:$src1, i64immSExt32:$src2)>;
|
||||||
|
|
||||||
// INC and DEC with EFLAGS result. Note that these do not set CF.
|
// INC and DEC with EFLAGS result. Note that these do not set CF.
|
||||||
|
def : Pat<(parallel (X86inc_flag GR16:$src), (implicit EFLAGS)),
|
||||||
|
(INC64_16r GR16:$src)>, Requires<[In64BitMode]>;
|
||||||
|
def : Pat<(parallel (store (i16 (X86inc_flag (loadi16 addr:$dst))), addr:$dst),
|
||||||
|
(implicit EFLAGS)),
|
||||||
|
(INC64_16m addr:$dst)>, Requires<[In64BitMode]>;
|
||||||
|
def : Pat<(parallel (X86dec_flag GR16:$src), (implicit EFLAGS)),
|
||||||
|
(DEC64_16r GR16:$src)>, Requires<[In64BitMode]>;
|
||||||
|
def : Pat<(parallel (store (i16 (X86dec_flag (loadi16 addr:$dst))), addr:$dst),
|
||||||
|
(implicit EFLAGS)),
|
||||||
|
(DEC64_16m addr:$dst)>, Requires<[In64BitMode]>;
|
||||||
|
|
||||||
|
def : Pat<(parallel (X86inc_flag GR32:$src), (implicit EFLAGS)),
|
||||||
|
(INC64_32r GR32:$src)>, Requires<[In64BitMode]>;
|
||||||
|
def : Pat<(parallel (store (i32 (X86inc_flag (loadi32 addr:$dst))), addr:$dst),
|
||||||
|
(implicit EFLAGS)),
|
||||||
|
(INC64_32m addr:$dst)>, Requires<[In64BitMode]>;
|
||||||
|
def : Pat<(parallel (X86dec_flag GR32:$src), (implicit EFLAGS)),
|
||||||
|
(DEC64_32r GR32:$src)>, Requires<[In64BitMode]>;
|
||||||
|
def : Pat<(parallel (store (i32 (X86dec_flag (loadi32 addr:$dst))), addr:$dst),
|
||||||
|
(implicit EFLAGS)),
|
||||||
|
(DEC64_32m addr:$dst)>, Requires<[In64BitMode]>;
|
||||||
|
|
||||||
def : Pat<(parallel (X86inc_flag GR64:$src), (implicit EFLAGS)),
|
def : Pat<(parallel (X86inc_flag GR64:$src), (implicit EFLAGS)),
|
||||||
(INC64r GR64:$src)>;
|
(INC64r GR64:$src)>;
|
||||||
def : Pat<(parallel (store (i64 (X86inc_flag (loadi64 addr:$dst))), addr:$dst),
|
def : Pat<(parallel (store (i64 (X86inc_flag (loadi64 addr:$dst))), addr:$dst),
|
||||||
|
@ -3715,26 +3715,26 @@ def : Pat<(parallel (store (i8 (X86dec_flag (loadi8 addr:$dst))), addr:$dst),
|
|||||||
(DEC8m addr:$dst)>;
|
(DEC8m addr:$dst)>;
|
||||||
|
|
||||||
def : Pat<(parallel (X86inc_flag GR16:$src), (implicit EFLAGS)),
|
def : Pat<(parallel (X86inc_flag GR16:$src), (implicit EFLAGS)),
|
||||||
(INC16r GR16:$src)>;
|
(INC16r GR16:$src)>, Requires<[In32BitMode]>;
|
||||||
def : Pat<(parallel (store (i16 (X86inc_flag (loadi16 addr:$dst))), addr:$dst),
|
def : Pat<(parallel (store (i16 (X86inc_flag (loadi16 addr:$dst))), addr:$dst),
|
||||||
(implicit EFLAGS)),
|
(implicit EFLAGS)),
|
||||||
(INC16m addr:$dst)>;
|
(INC16m addr:$dst)>, Requires<[In32BitMode]>;
|
||||||
def : Pat<(parallel (X86dec_flag GR16:$src), (implicit EFLAGS)),
|
def : Pat<(parallel (X86dec_flag GR16:$src), (implicit EFLAGS)),
|
||||||
(DEC16r GR16:$src)>;
|
(DEC16r GR16:$src)>, Requires<[In32BitMode]>;
|
||||||
def : Pat<(parallel (store (i16 (X86dec_flag (loadi16 addr:$dst))), addr:$dst),
|
def : Pat<(parallel (store (i16 (X86dec_flag (loadi16 addr:$dst))), addr:$dst),
|
||||||
(implicit EFLAGS)),
|
(implicit EFLAGS)),
|
||||||
(DEC16m addr:$dst)>;
|
(DEC16m addr:$dst)>, Requires<[In32BitMode]>;
|
||||||
|
|
||||||
def : Pat<(parallel (X86inc_flag GR32:$src), (implicit EFLAGS)),
|
def : Pat<(parallel (X86inc_flag GR32:$src), (implicit EFLAGS)),
|
||||||
(INC32r GR32:$src)>;
|
(INC32r GR32:$src)>, Requires<[In32BitMode]>;
|
||||||
def : Pat<(parallel (store (i32 (X86inc_flag (loadi32 addr:$dst))), addr:$dst),
|
def : Pat<(parallel (store (i32 (X86inc_flag (loadi32 addr:$dst))), addr:$dst),
|
||||||
(implicit EFLAGS)),
|
(implicit EFLAGS)),
|
||||||
(INC32m addr:$dst)>;
|
(INC32m addr:$dst)>, Requires<[In32BitMode]>;
|
||||||
def : Pat<(parallel (X86dec_flag GR32:$src), (implicit EFLAGS)),
|
def : Pat<(parallel (X86dec_flag GR32:$src), (implicit EFLAGS)),
|
||||||
(DEC32r GR32:$src)>;
|
(DEC32r GR32:$src)>, Requires<[In32BitMode]>;
|
||||||
def : Pat<(parallel (store (i32 (X86dec_flag (loadi32 addr:$dst))), addr:$dst),
|
def : Pat<(parallel (store (i32 (X86dec_flag (loadi32 addr:$dst))), addr:$dst),
|
||||||
(implicit EFLAGS)),
|
(implicit EFLAGS)),
|
||||||
(DEC32m addr:$dst)>;
|
(DEC32m addr:$dst)>, Requires<[In32BitMode]>;
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// Floating Point Stack Support
|
// Floating Point Stack Support
|
||||||
|
Loading…
Reference in New Issue
Block a user