mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
fix the operand constraints of the immediate form of in/out,
allowing unsigned 8-bit operands. This fixes rdar://8208481 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113182 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ce4a3355d9
commit
9389b60a03
@ -978,13 +978,13 @@ def IN32rr : I<0xED, RawFrm, (outs), (ins),
|
||||
"in{l}\t{%dx, %eax|%EAX, %DX}", []>;
|
||||
|
||||
let Defs = [AL] in
|
||||
def IN8ri : Ii8<0xE4, RawFrm, (outs), (ins i16i8imm:$port),
|
||||
def IN8ri : Ii8<0xE4, RawFrm, (outs), (ins i8imm:$port),
|
||||
"in{b}\t{$port, %al|%AL, $port}", []>;
|
||||
let Defs = [AX] in
|
||||
def IN16ri : Ii8<0xE5, RawFrm, (outs), (ins i16i8imm:$port),
|
||||
def IN16ri : Ii8<0xE5, RawFrm, (outs), (ins i8imm:$port),
|
||||
"in{w}\t{$port, %ax|%AX, $port}", []>, OpSize;
|
||||
let Defs = [EAX] in
|
||||
def IN32ri : Ii8<0xE5, RawFrm, (outs), (ins i16i8imm:$port),
|
||||
def IN32ri : Ii8<0xE5, RawFrm, (outs), (ins i8imm:$port),
|
||||
"in{l}\t{$port, %eax|%EAX, $port}", []>;
|
||||
|
||||
let Uses = [DX, AL] in
|
||||
@ -998,13 +998,13 @@ def OUT32rr : I<0xEF, RawFrm, (outs), (ins),
|
||||
"out{l}\t{%eax, %dx|%DX, %EAX}", []>;
|
||||
|
||||
let Uses = [AL] in
|
||||
def OUT8ir : Ii8<0xE6, RawFrm, (outs), (ins i16i8imm:$port),
|
||||
def OUT8ir : Ii8<0xE6, RawFrm, (outs), (ins i8imm:$port),
|
||||
"out{b}\t{%al, $port|$port, %AL}", []>;
|
||||
let Uses = [AX] in
|
||||
def OUT16ir : Ii8<0xE7, RawFrm, (outs), (ins i16i8imm:$port),
|
||||
def OUT16ir : Ii8<0xE7, RawFrm, (outs), (ins i8imm:$port),
|
||||
"out{w}\t{%ax, $port|$port, %AX}", []>, OpSize;
|
||||
let Uses = [EAX] in
|
||||
def OUT32ir : Ii8<0xE7, RawFrm, (outs), (ins i16i8imm:$port),
|
||||
def OUT32ir : Ii8<0xE7, RawFrm, (outs), (ins i8imm:$port),
|
||||
"out{l}\t{%eax, $port|$port, %EAX}", []>;
|
||||
|
||||
def IN8 : I<0x6C, RawFrm, (outs), (ins),
|
||||
|
@ -164,3 +164,12 @@ imul $12, %eax
|
||||
|
||||
// CHECK: imull %ecx, %eax
|
||||
imull %ecx, %eax
|
||||
|
||||
|
||||
// rdar://8208481
|
||||
// CHECK: outb %al, $161
|
||||
outb %al, $161
|
||||
// CHECK: outw %ax, $128
|
||||
outw %ax, $128
|
||||
// CHECK: inb $161, %al
|
||||
inb $161, %al
|
||||
|
Loading…
Reference in New Issue
Block a user