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

Side by Side Diff: src/IceTargetLoweringX8632.h

Issue 444443002: Subzero: Align the stack at the point of function calls. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Comments round 3 Created 6 years, 4 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 | « src/IceInstX8632.cpp ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceTargetLoweringX8632.h - x86-32 lowering ---*- C++ -*-===// 1 //===- subzero/src/IceTargetLoweringX8632.h - x86-32 lowering ---*- C++ -*-===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
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 declares the TargetLoweringX8632 class, which 10 // This file declares the TargetLoweringX8632 class, which
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 181
182 // The following are helpers that insert lowered x86 instructions 182 // The following are helpers that insert lowered x86 instructions
183 // with minimal syntactic overhead, so that the lowering code can 183 // with minimal syntactic overhead, so that the lowering code can
184 // look as close to assembly as practical. 184 // look as close to assembly as practical.
185 void _adc(Variable *Dest, Operand *Src0) { 185 void _adc(Variable *Dest, Operand *Src0) {
186 Context.insert(InstX8632Adc::create(Func, Dest, Src0)); 186 Context.insert(InstX8632Adc::create(Func, Dest, Src0));
187 } 187 }
188 void _add(Variable *Dest, Operand *Src0) { 188 void _add(Variable *Dest, Operand *Src0) {
189 Context.insert(InstX8632Add::create(Func, Dest, Src0)); 189 Context.insert(InstX8632Add::create(Func, Dest, Src0));
190 } 190 }
191 void _adjust_stack(int32_t Amount) {
192 Context.insert(InstX8632AdjustStack::create(Func, Amount));
193 }
191 void _addps(Variable *Dest, Operand *Src0) { 194 void _addps(Variable *Dest, Operand *Src0) {
192 Context.insert(InstX8632Addps::create(Func, Dest, Src0)); 195 Context.insert(InstX8632Addps::create(Func, Dest, Src0));
193 } 196 }
194 void _addss(Variable *Dest, Operand *Src0) { 197 void _addss(Variable *Dest, Operand *Src0) {
195 Context.insert(InstX8632Addss::create(Func, Dest, Src0)); 198 Context.insert(InstX8632Addss::create(Func, Dest, Src0));
196 } 199 }
197 void _and(Variable *Dest, Operand *Src0) { 200 void _and(Variable *Dest, Operand *Src0) {
198 Context.insert(InstX8632And::create(Func, Dest, Src0)); 201 Context.insert(InstX8632And::create(Func, Dest, Src0));
199 } 202 }
200 void _blendvps(Variable *Dest, Operand *Src0, Operand *Src1) { 203 void _blendvps(Variable *Dest, Operand *Src0, Operand *Src1) {
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 } 408 }
406 void _shufps(Variable *Dest, Operand *Src0, Operand *Src1) { 409 void _shufps(Variable *Dest, Operand *Src0, Operand *Src1) {
407 Context.insert(InstX8632Shufps::create(Func, Dest, Src0, Src1)); 410 Context.insert(InstX8632Shufps::create(Func, Dest, Src0, Src1));
408 } 411 }
409 void _sqrtss(Variable *Dest, Operand *Src0) { 412 void _sqrtss(Variable *Dest, Operand *Src0) {
410 Context.insert(InstX8632Sqrtss::create(Func, Dest, Src0)); 413 Context.insert(InstX8632Sqrtss::create(Func, Dest, Src0));
411 } 414 }
412 void _store(Operand *Value, OperandX8632 *Mem) { 415 void _store(Operand *Value, OperandX8632 *Mem) {
413 Context.insert(InstX8632Store::create(Func, Value, Mem)); 416 Context.insert(InstX8632Store::create(Func, Value, Mem));
414 } 417 }
418 void _storep(Operand *Value, OperandX8632 *Mem) {
419 Context.insert(InstX8632StoreP::create(Func, Value, Mem));
420 }
415 void _storeq(Operand *Value, OperandX8632 *Mem) { 421 void _storeq(Operand *Value, OperandX8632 *Mem) {
416 Context.insert(InstX8632StoreQ::create(Func, Value, Mem)); 422 Context.insert(InstX8632StoreQ::create(Func, Value, Mem));
417 } 423 }
418 void _sub(Variable *Dest, Operand *Src0) { 424 void _sub(Variable *Dest, Operand *Src0) {
419 Context.insert(InstX8632Sub::create(Func, Dest, Src0)); 425 Context.insert(InstX8632Sub::create(Func, Dest, Src0));
420 } 426 }
421 void _subps(Variable *Dest, Operand *Src0) { 427 void _subps(Variable *Dest, Operand *Src0) {
422 Context.insert(InstX8632Subps::create(Func, Dest, Src0)); 428 Context.insert(InstX8632Subps::create(Func, Dest, Src0));
423 } 429 }
424 void _subss(Variable *Dest, Operand *Src0) { 430 void _subss(Variable *Dest, Operand *Src0) {
(...skipping 18 matching lines...) Expand all
443 // The xchg modifies Dest and Src -- model that update with a FakeDef. 449 // The xchg modifies Dest and Src -- model that update with a FakeDef.
444 Context.insert( 450 Context.insert(
445 InstFakeDef::create(Func, Src, llvm::dyn_cast<Variable>(Dest))); 451 InstFakeDef::create(Func, Src, llvm::dyn_cast<Variable>(Dest)));
446 } 452 }
447 void _xor(Variable *Dest, Operand *Src0) { 453 void _xor(Variable *Dest, Operand *Src0) {
448 Context.insert(InstX8632Xor::create(Func, Dest, Src0)); 454 Context.insert(InstX8632Xor::create(Func, Dest, Src0));
449 } 455 }
450 456
451 const X86InstructionSet InstructionSet; 457 const X86InstructionSet InstructionSet;
452 bool IsEbpBasedFrame; 458 bool IsEbpBasedFrame;
459 bool NeedsStackAlignment;
453 size_t FrameSizeLocals; 460 size_t FrameSizeLocals;
454 size_t LocalsSizeBytes; 461 size_t LocalsSizeBytes;
455 llvm::SmallBitVector TypeToRegisterSet[IceType_NUM]; 462 llvm::SmallBitVector TypeToRegisterSet[IceType_NUM];
456 llvm::SmallBitVector ScratchRegs; 463 llvm::SmallBitVector ScratchRegs;
457 llvm::SmallBitVector RegsUsed; 464 llvm::SmallBitVector RegsUsed;
458 SizeT NextLabelNumber; 465 SizeT NextLabelNumber;
459 bool ComputedLiveRanges; 466 bool ComputedLiveRanges;
460 VarList PhysicalRegisters; 467 VarList PhysicalRegisters;
461 static IceString RegNames[]; 468 static IceString RegNames[];
462 469
(...skipping 23 matching lines...) Expand all
486 virtual ~TargetGlobalInitX8632() {} 493 virtual ~TargetGlobalInitX8632() {}
487 }; 494 };
488 495
489 template <> void ConstantInteger::emit(GlobalContext *Ctx) const; 496 template <> void ConstantInteger::emit(GlobalContext *Ctx) const;
490 template <> void ConstantFloat::emit(GlobalContext *Ctx) const; 497 template <> void ConstantFloat::emit(GlobalContext *Ctx) const;
491 template <> void ConstantDouble::emit(GlobalContext *Ctx) const; 498 template <> void ConstantDouble::emit(GlobalContext *Ctx) const;
492 499
493 } // end of namespace Ice 500 } // end of namespace Ice
494 501
495 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H 502 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H
OLDNEW
« no previous file with comments | « src/IceInstX8632.cpp ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698