Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(373)

Side by Side Diff: llvm-trunk/lib/Target/X86/X86InstrInfo.cpp

Issue 1557002: llvm x86 support (Closed)
Patch Set: remove whitespace diff Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | llvm-trunk/lib/Target/X86/X86InstrInfo.td » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- X86InstrInfo.cpp - X86 Instruction Information -----------*- C++ -*-===// 1 //===- X86InstrInfo.cpp - X86 Instruction Information -----------*- C++ -*-===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // This file contains the X86 implementation of the TargetInstrInfo class. 10 // This file contains the X86 implementation of the TargetInstrInfo class.
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 std::make_pair(RegOp, 225 std::make_pair(RegOp,
226 AuxInfo))).second) 226 AuxInfo))).second)
227 AmbEntries.push_back(MemOp); 227 AmbEntries.push_back(MemOp);
228 } 228 }
229 229
230 // If the third value is 1, then it's folding either a load or a store. 230 // If the third value is 1, then it's folding either a load or a store.
231 static const unsigned OpTbl0[][4] = { 231 static const unsigned OpTbl0[][4] = {
232 { X86::BT16ri8, X86::BT16mi8, 1, 0 }, 232 { X86::BT16ri8, X86::BT16mi8, 1, 0 },
233 { X86::BT32ri8, X86::BT32mi8, 1, 0 }, 233 { X86::BT32ri8, X86::BT32mi8, 1, 0 },
234 { X86::BT64ri8, X86::BT64mi8, 1, 0 }, 234 { X86::BT64ri8, X86::BT64mi8, 1, 0 },
235 { X86::CALL32r, X86::CALL32m, 1, 0 }, 235 // @LOCALMOD-START
236 // { X86::CALL32r, X86::CALL32m, 1, 0 },
237 // @LOCALMOD-END
236 { X86::CALL64r, X86::CALL64m, 1, 0 }, 238 { X86::CALL64r, X86::CALL64m, 1, 0 },
237 { X86::CMP16ri, X86::CMP16mi, 1, 0 }, 239 { X86::CMP16ri, X86::CMP16mi, 1, 0 },
238 { X86::CMP16ri8, X86::CMP16mi8, 1, 0 }, 240 { X86::CMP16ri8, X86::CMP16mi8, 1, 0 },
239 { X86::CMP16rr, X86::CMP16mr, 1, 0 }, 241 { X86::CMP16rr, X86::CMP16mr, 1, 0 },
240 { X86::CMP32ri, X86::CMP32mi, 1, 0 }, 242 { X86::CMP32ri, X86::CMP32mi, 1, 0 },
241 { X86::CMP32ri8, X86::CMP32mi8, 1, 0 }, 243 { X86::CMP32ri8, X86::CMP32mi8, 1, 0 },
242 { X86::CMP32rr, X86::CMP32mr, 1, 0 }, 244 { X86::CMP32rr, X86::CMP32mr, 1, 0 },
243 { X86::CMP64ri32, X86::CMP64mi32, 1, 0 }, 245 { X86::CMP64ri32, X86::CMP64mi32, 1, 0 },
244 { X86::CMP64ri8, X86::CMP64mi8, 1, 0 }, 246 { X86::CMP64ri8, X86::CMP64mi8, 1, 0 },
245 { X86::CMP64rr, X86::CMP64mr, 1, 0 }, 247 { X86::CMP64rr, X86::CMP64mr, 1, 0 },
246 { X86::CMP8ri, X86::CMP8mi, 1, 0 }, 248 { X86::CMP8ri, X86::CMP8mi, 1, 0 },
247 { X86::CMP8rr, X86::CMP8mr, 1, 0 }, 249 { X86::CMP8rr, X86::CMP8mr, 1, 0 },
248 { X86::DIV16r, X86::DIV16m, 1, 0 }, 250 { X86::DIV16r, X86::DIV16m, 1, 0 },
249 { X86::DIV32r, X86::DIV32m, 1, 0 }, 251 { X86::DIV32r, X86::DIV32m, 1, 0 },
250 { X86::DIV64r, X86::DIV64m, 1, 0 }, 252 { X86::DIV64r, X86::DIV64m, 1, 0 },
251 { X86::DIV8r, X86::DIV8m, 1, 0 }, 253 { X86::DIV8r, X86::DIV8m, 1, 0 },
252 { X86::EXTRACTPSrr, X86::EXTRACTPSmr, 0, 16 }, 254 { X86::EXTRACTPSrr, X86::EXTRACTPSmr, 0, 16 },
253 { X86::FsMOVAPDrr, X86::MOVSDmr, 0, 0 }, 255 { X86::FsMOVAPDrr, X86::MOVSDmr, 0, 0 },
254 { X86::FsMOVAPSrr, X86::MOVSSmr, 0, 0 }, 256 { X86::FsMOVAPSrr, X86::MOVSSmr, 0, 0 },
255 { X86::IDIV16r, X86::IDIV16m, 1, 0 }, 257 { X86::IDIV16r, X86::IDIV16m, 1, 0 },
256 { X86::IDIV32r, X86::IDIV32m, 1, 0 }, 258 { X86::IDIV32r, X86::IDIV32m, 1, 0 },
257 { X86::IDIV64r, X86::IDIV64m, 1, 0 }, 259 { X86::IDIV64r, X86::IDIV64m, 1, 0 },
258 { X86::IDIV8r, X86::IDIV8m, 1, 0 }, 260 { X86::IDIV8r, X86::IDIV8m, 1, 0 },
259 { X86::IMUL16r, X86::IMUL16m, 1, 0 }, 261 { X86::IMUL16r, X86::IMUL16m, 1, 0 },
260 { X86::IMUL32r, X86::IMUL32m, 1, 0 }, 262 { X86::IMUL32r, X86::IMUL32m, 1, 0 },
261 { X86::IMUL64r, X86::IMUL64m, 1, 0 }, 263 { X86::IMUL64r, X86::IMUL64m, 1, 0 },
262 { X86::IMUL8r, X86::IMUL8m, 1, 0 }, 264 { X86::IMUL8r, X86::IMUL8m, 1, 0 },
263 { X86::JMP32r, X86::JMP32m, 1, 0 }, 265 // @LOCALMOD-START
266 //{ X86::JMP32r, X86::JMP32m, 1, 0 },
267 // @LOCALMOD-END
264 { X86::JMP64r, X86::JMP64m, 1, 0 }, 268 { X86::JMP64r, X86::JMP64m, 1, 0 },
265 { X86::MOV16ri, X86::MOV16mi, 0, 0 }, 269 { X86::MOV16ri, X86::MOV16mi, 0, 0 },
266 { X86::MOV16rr, X86::MOV16mr, 0, 0 }, 270 { X86::MOV16rr, X86::MOV16mr, 0, 0 },
267 { X86::MOV32ri, X86::MOV32mi, 0, 0 }, 271 { X86::MOV32ri, X86::MOV32mi, 0, 0 },
268 { X86::MOV32rr, X86::MOV32mr, 0, 0 }, 272 { X86::MOV32rr, X86::MOV32mr, 0, 0 },
269 { X86::MOV32rr_TC, X86::MOV32mr_TC, 0, 0 }, 273 { X86::MOV32rr_TC, X86::MOV32mr_TC, 0, 0 },
270 { X86::MOV64ri32, X86::MOV64mi32, 0, 0 }, 274 { X86::MOV64ri32, X86::MOV64mi32, 0, 0 },
271 { X86::MOV64rr, X86::MOV64mr, 0, 0 }, 275 { X86::MOV64rr, X86::MOV64mr, 0, 0 },
272 { X86::MOV8ri, X86::MOV8mi, 0, 0 }, 276 { X86::MOV8ri, X86::MOV8mi, 0, 0 },
273 { X86::MOV8rr, X86::MOV8mr, 0, 0 }, 277 { X86::MOV8rr, X86::MOV8mr, 0, 0 },
(...skipping 3367 matching lines...) Expand 10 before | Expand all | Expand 10 after
3641 BuildMI(FirstMBB, MBBI, DL, TII->get(X86::ADD32ri), GlobalBaseReg) 3645 BuildMI(FirstMBB, MBBI, DL, TII->get(X86::ADD32ri), GlobalBaseReg)
3642 .addReg(PC).addExternalSymbol("_GLOBAL_OFFSET_TABLE_", 3646 .addReg(PC).addExternalSymbol("_GLOBAL_OFFSET_TABLE_",
3643 X86II::MO_GOT_ABSOLUTE_ADDRESS); 3647 X86II::MO_GOT_ABSOLUTE_ADDRESS);
3644 } else { 3648 } else {
3645 GlobalBaseReg = PC; 3649 GlobalBaseReg = PC;
3646 } 3650 }
3647 3651
3648 X86FI->setGlobalBaseReg(GlobalBaseReg); 3652 X86FI->setGlobalBaseReg(GlobalBaseReg);
3649 return GlobalBaseReg; 3653 return GlobalBaseReg;
3650 } 3654 }
OLDNEW
« no previous file with comments | « no previous file | llvm-trunk/lib/Target/X86/X86InstrInfo.td » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698