Skip to content

Commit be0ac71

Browse files
author
Tony Tao
committed
more formatting
1 parent f211b6e commit be0ac71

File tree

1 file changed

+33
-34
lines changed

1 file changed

+33
-34
lines changed

llvm/lib/Target/SystemZ/MCTargetDesc/SystemZInstPrinterCommon.cpp

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -89,67 +89,67 @@ void SystemZInstPrinterCommon::printSImmOperand(const MCInst *MI, int OpNum,
8989
}
9090

9191
void SystemZInstPrinterCommon::printU1ImmOperand(const MCInst *MI, int OpNum,
92-
raw_ostream &O) {
92+
raw_ostream &O) {
9393
printUImmOperand<1>(MI, OpNum, O);
9494
}
9595

9696
void SystemZInstPrinterCommon::printU2ImmOperand(const MCInst *MI, int OpNum,
97-
raw_ostream &O) {
97+
raw_ostream &O) {
9898
printUImmOperand<2>(MI, OpNum, O);
9999
}
100100

101101
void SystemZInstPrinterCommon::printU3ImmOperand(const MCInst *MI, int OpNum,
102-
raw_ostream &O) {
102+
raw_ostream &O) {
103103
printUImmOperand<3>(MI, OpNum, O);
104104
}
105105

106106
void SystemZInstPrinterCommon::printU4ImmOperand(const MCInst *MI, int OpNum,
107-
raw_ostream &O) {
107+
raw_ostream &O) {
108108
printUImmOperand<4>(MI, OpNum, O);
109109
}
110110

111111
void SystemZInstPrinterCommon::printS8ImmOperand(const MCInst *MI, int OpNum,
112-
raw_ostream &O) {
112+
raw_ostream &O) {
113113
printSImmOperand<8>(MI, OpNum, O);
114114
}
115115

116116
void SystemZInstPrinterCommon::printU8ImmOperand(const MCInst *MI, int OpNum,
117-
raw_ostream &O) {
117+
raw_ostream &O) {
118118
printUImmOperand<8>(MI, OpNum, O);
119119
}
120120

121121
void SystemZInstPrinterCommon::printU12ImmOperand(const MCInst *MI, int OpNum,
122-
raw_ostream &O) {
122+
raw_ostream &O) {
123123
printUImmOperand<12>(MI, OpNum, O);
124124
}
125125

126126
void SystemZInstPrinterCommon::printS16ImmOperand(const MCInst *MI, int OpNum,
127-
raw_ostream &O) {
127+
raw_ostream &O) {
128128
printSImmOperand<16>(MI, OpNum, O);
129129
}
130130

131131
void SystemZInstPrinterCommon::printU16ImmOperand(const MCInst *MI, int OpNum,
132-
raw_ostream &O) {
132+
raw_ostream &O) {
133133
printUImmOperand<16>(MI, OpNum, O);
134134
}
135135

136136
void SystemZInstPrinterCommon::printS32ImmOperand(const MCInst *MI, int OpNum,
137-
raw_ostream &O) {
137+
raw_ostream &O) {
138138
printSImmOperand<32>(MI, OpNum, O);
139139
}
140140

141141
void SystemZInstPrinterCommon::printU32ImmOperand(const MCInst *MI, int OpNum,
142-
raw_ostream &O) {
142+
raw_ostream &O) {
143143
printUImmOperand<32>(MI, OpNum, O);
144144
}
145145

146146
void SystemZInstPrinterCommon::printU48ImmOperand(const MCInst *MI, int OpNum,
147-
raw_ostream &O) {
147+
raw_ostream &O) {
148148
printUImmOperand<48>(MI, OpNum, O);
149149
}
150150

151151
void SystemZInstPrinterCommon::printPCRelOperand(const MCInst *MI, int OpNum,
152-
raw_ostream &O) {
152+
raw_ostream &O) {
153153
const MCOperand &MO = MI->getOperand(OpNum);
154154
if (MO.isImm()) {
155155
WithMarkup M = markup(O, Markup::Immediate);
@@ -160,8 +160,8 @@ void SystemZInstPrinterCommon::printPCRelOperand(const MCInst *MI, int OpNum,
160160
}
161161

162162
void SystemZInstPrinterCommon::printPCRelTLSOperand(const MCInst *MI,
163-
uint64_t Address, int OpNum,
164-
raw_ostream &O) {
163+
uint64_t Address, int OpNum,
164+
raw_ostream &O) {
165165
// Output the PC-relative operand.
166166
printPCRelOperand(MI, OpNum, O);
167167

@@ -170,38 +170,38 @@ void SystemZInstPrinterCommon::printPCRelTLSOperand(const MCInst *MI,
170170
const MCOperand &MO = MI->getOperand(OpNum + 1);
171171
const MCSymbolRefExpr &refExp = cast<MCSymbolRefExpr>(*MO.getExpr());
172172
switch (refExp.getKind()) {
173-
case MCSymbolRefExpr::VK_TLSGD:
174-
O << ":tls_gdcall:";
175-
break;
176-
case MCSymbolRefExpr::VK_TLSLDM:
177-
O << ":tls_ldcall:";
178-
break;
179-
default:
180-
llvm_unreachable("Unexpected symbol kind");
173+
case MCSymbolRefExpr::VK_TLSGD:
174+
O << ":tls_gdcall:";
175+
break;
176+
case MCSymbolRefExpr::VK_TLSLDM:
177+
O << ":tls_ldcall:";
178+
break;
179+
default:
180+
llvm_unreachable("Unexpected symbol kind");
181181
}
182182
O << refExp.getSymbol().getName();
183183
}
184184
}
185185

186186
void SystemZInstPrinterCommon::printOperand(const MCInst *MI, int OpNum,
187-
raw_ostream &O) {
187+
raw_ostream &O) {
188188
printOperand(MI->getOperand(OpNum), &MAI, O);
189189
}
190190

191191
void SystemZInstPrinterCommon::printBDAddrOperand(const MCInst *MI, int OpNum,
192-
raw_ostream &O) {
192+
raw_ostream &O) {
193193
printAddress(&MAI, MI->getOperand(OpNum).getReg(), MI->getOperand(OpNum + 1),
194194
0, O);
195195
}
196196

197197
void SystemZInstPrinterCommon::printBDXAddrOperand(const MCInst *MI, int OpNum,
198-
raw_ostream &O) {
198+
raw_ostream &O) {
199199
printAddress(&MAI, MI->getOperand(OpNum).getReg(), MI->getOperand(OpNum + 1),
200200
MI->getOperand(OpNum + 2).getReg(), O);
201201
}
202202

203203
void SystemZInstPrinterCommon::printBDLAddrOperand(const MCInst *MI, int OpNum,
204-
raw_ostream &O) {
204+
raw_ostream &O) {
205205
unsigned Base = MI->getOperand(OpNum).getReg();
206206
const MCOperand &DispMO = MI->getOperand(OpNum + 1);
207207
uint64_t Length = MI->getOperand(OpNum + 2).getImm();
@@ -215,7 +215,7 @@ void SystemZInstPrinterCommon::printBDLAddrOperand(const MCInst *MI, int OpNum,
215215
}
216216

217217
void SystemZInstPrinterCommon::printBDRAddrOperand(const MCInst *MI, int OpNum,
218-
raw_ostream &O) {
218+
raw_ostream &O) {
219219
unsigned Base = MI->getOperand(OpNum).getReg();
220220
const MCOperand &DispMO = MI->getOperand(OpNum + 1);
221221
unsigned Length = MI->getOperand(OpNum + 2).getReg();
@@ -230,17 +230,16 @@ void SystemZInstPrinterCommon::printBDRAddrOperand(const MCInst *MI, int OpNum,
230230
}
231231

232232
void SystemZInstPrinterCommon::printBDVAddrOperand(const MCInst *MI, int OpNum,
233-
raw_ostream &O) {
233+
raw_ostream &O) {
234234
printAddress(&MAI, MI->getOperand(OpNum).getReg(), MI->getOperand(OpNum + 1),
235235
MI->getOperand(OpNum + 2).getReg(), O);
236236
}
237237

238238
void SystemZInstPrinterCommon::printCond4Operand(const MCInst *MI, int OpNum,
239-
raw_ostream &O) {
240-
static const char *const CondNames[] = {
241-
"o", "h", "nle", "l", "nhe", "lh", "ne",
242-
"e", "nlh", "he", "nl", "le", "nh", "no"
243-
};
239+
raw_ostream &O) {
240+
static const char *const CondNames[] = {"o", "h", "nle", "l", "nhe",
241+
"lh", "ne", "e", "nlh", "he",
242+
"nl", "le", "nh", "no"};
244243
uint64_t Imm = MI->getOperand(OpNum).getImm();
245244
assert(Imm > 0 && Imm < 15 && "Invalid condition");
246245
O << CondNames[Imm - 1];

0 commit comments

Comments
 (0)