Skip to content

Commit 72d8250

Browse files
committed
Add port address spaces.
1 parent ec350d8 commit 72d8250

File tree

19 files changed

+27800
-23101
lines changed

19 files changed

+27800
-23101
lines changed

Diff for: clang/lib/Basic/Targets/Z80.cpp

+8-2
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,14 @@ bool Z80TargetInfoBase::validateAsmConstraint(
111111
case 'I': // bit offset within byte [0,7]
112112
Info.setRequiresImmediate(0, 7);
113113
return true;
114-
case 'J': // port address [0,255]
115-
Info.setRequiresImmediate(0, 255);
114+
case 'J': // immediate [0,0xFF]
115+
Info.setRequiresImmediate(0, 0xFF);
116+
return true;
117+
case 'K': // immediate [0,0xFFFF]
118+
Info.setRequiresImmediate(0, 0xFFFF);
119+
return true;
120+
case 'L': // immediate [0,0xFFFFFF]
121+
Info.setRequiresImmediate(0, 0xFFFFFF);
116122
return true;
117123
case 'M': // im mode [0,2]
118124
Info.setRequiresImmediate(0, 2);

Diff for: clang/lib/Basic/Targets/Z80.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class LLVM_LIBRARY_VISIBILITY Z80TargetInfo : public Z80TargetInfoBase {
6565
explicit Z80TargetInfo(const llvm::Triple &T, const TargetOptions &Opts)
6666
: Z80TargetInfoBase(T, Opts) {
6767
PointerWidth = IntWidth = 16;
68-
resetDataLayout("e-m:z-p:16:8-p1:8:8-i16:8-i24:8-i32:8-i48:8-i64:8-i96:8-"
68+
resetDataLayout("e-m:z-p:16:8-p2:8:8-p3:16:8-i16:8-i24:8-i32:8-i48:8-i64:8-i96:8-"
6969
"f32:8-f64:8-a:8-n8:16-S8", "_");
7070
}
7171

@@ -87,11 +87,11 @@ class LLVM_LIBRARY_VISIBILITY EZ80TargetInfo : public Z80TargetInfoBase {
8787
: Z80TargetInfoBase(T, Opts) {
8888
if (T.getEnvironment() == llvm::Triple::CODE16) {
8989
PointerWidth = IntWidth = 16;
90-
resetDataLayout("e-m:z-p:16:8-p1:16:8-p2:24:8-i16:8-i24:8-i32:8-i48:8-"
90+
resetDataLayout("e-m:z-p:16:8-p1:24:8-p2:8:8-p3:16:8-p4:24:8-i16:8-i24:8-i32:8-i48:8-"
9191
"i64:8-i96:8-f32:8-f64:8-a:8-n8:16-S8", "_");
9292
} else {
9393
PointerWidth = IntWidth = 24;
94-
resetDataLayout("e-m:z-p:24:8-p1:16:8-p2:16:8-i16:8-i24:8-i32:8-i48:8-"
94+
resetDataLayout("e-m:z-p:24:8-p1:16:8-p2:8:8-p3:16:8-p4:24:8-i16:8-i24:8-i32:8-i48:8-"
9595
"i64:8-i96:8-f32:8-f64:8-a:8-n8:16:24-S8", "_");
9696
}
9797
}

Diff for: llvm/include/llvm/Target/GlobalISel/Combine.td

+1-1
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,7 @@ def lower_is_power_of_two : GICombineRule<
10321032
def simplify_const_matchdata : GIDefMatchData<"Optional<ValueAndVReg>">;
10331033
def simplify_const : GICombineRule<
10341034
(defs root:$mi, simplify_const_matchdata:$matchinfo),
1035-
(match (wip_match_opcode G_INTTOPTR, G_TRUNC, G_SEXT, G_ZEXT):$mi,
1035+
(match (wip_match_opcode G_TRUNC, G_SEXT, G_ZEXT):$mi,
10361036
[{ ${matchinfo} = getIConstantVRegValWithLookThrough(
10371037
${mi}->getOperand(0).getReg(), MRI);
10381038
return ${matchinfo}.hasValue(); }]),

0 commit comments

Comments
 (0)