1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

Use asm printer to emit alignment

llvm-svn: 33485
This commit is contained in:
Jim Laskey 2007-01-24 13:12:32 +00:00
parent c6db78ab84
commit dabb50be28
2 changed files with 4 additions and 8 deletions

View File

@ -174,12 +174,14 @@ namespace llvm {
/// do nothing and return false. /// do nothing and return false.
bool EmitSpecialLLVMGlobal(const GlobalVariable *GV); bool EmitSpecialLLVMGlobal(const GlobalVariable *GV);
public:
/// EmitAlignment - Emit an alignment directive to the specified power of /// EmitAlignment - Emit an alignment directive to the specified power of
/// two boundary. For example, if you pass in 3 here, you will get an 8 /// two boundary. For example, if you pass in 3 here, you will get an 8
/// byte alignment. If a global value is specified, and if that global has /// byte alignment. If a global value is specified, and if that global has
/// an explicit alignment requested, it will override the alignment request. /// an explicit alignment requested, it will override the alignment request.
void EmitAlignment(unsigned NumBits, const GlobalValue *GV = 0) const; void EmitAlignment(unsigned NumBits, const GlobalValue *GV = 0) const;
protected:
/// EmitZeros - Emit a block of zeros. /// EmitZeros - Emit a block of zeros.
/// ///
void EmitZeros(uint64_t NumZeros) const; void EmitZeros(uint64_t NumZeros) const;

View File

@ -945,12 +945,6 @@ public:
O << "\n"; O << "\n";
} }
/// EmitAlign - Print a align directive.
///
void EmitAlign(unsigned Alignment) const {
O << TAI->getAlignDirective() << Alignment << "\n";
}
/// EmitULEB128Bytes - Emit an assembler byte data directive to compose an /// EmitULEB128Bytes - Emit an assembler byte data directive to compose an
/// unsigned leb128 value. /// unsigned leb128 value.
void EmitULEB128Bytes(unsigned Value) const { void EmitULEB128Bytes(unsigned Value) const {
@ -2444,7 +2438,7 @@ private:
EmitFrameMoves(NULL, 0, Moves); EmitFrameMoves(NULL, 0, Moves);
for (unsigned i = 0, N = Moves.size(); i < N; ++i) delete Moves[i]; for (unsigned i = 0, N = Moves.size(); i < N; ++i) delete Moves[i];
EmitAlign(2); Asm->EmitAlignment(2);
EmitLabel("frame_common_end", 0); EmitLabel("frame_common_end", 0);
O << "\n"; O << "\n";
@ -2477,7 +2471,7 @@ private:
EmitFrameMoves("func_begin", SubprogramCount, Moves); EmitFrameMoves("func_begin", SubprogramCount, Moves);
EmitAlign(2); Asm->EmitAlignment(2);
EmitLabel("frame_end", SubprogramCount); EmitLabel("frame_end", SubprogramCount);
O << "\n"; O << "\n";