Skip to content

Commit d0d0f04

Browse files
committed
[M68k] Fix MOVZXd32d16 illegally operating on address registers
Sext and zext are applied by using EXT or ANDI on the destination register. In some cases, the destination register could be an address register, which doesn't support those instructions. This change enforces the instruction to only be available on data registers.
1 parent 85f663f commit d0d0f04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/M68k/M68kInstrData.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ foreach EXT = ["S", "Z"] in {
607607

608608
def MOV#EXT#Xd16d8 : MxPseudoMove_RR<MxType16d, MxType8d>;
609609
def MOV#EXT#Xd32d8 : MxPseudoMove_RR<MxType32d, MxType8d>;
610-
def MOV#EXT#Xd32d16 : MxPseudoMove_RR<MxType32r, MxType16r>;
610+
def MOV#EXT#Xd32d16 : MxPseudoMove_RR<MxType32d, MxType16d>;
611611

612612
let mayLoad = 1 in {
613613

0 commit comments

Comments
 (0)