search for: emitcodealignment

Displaying 5 results from an estimated 5 matches for "emitcodealignment".

2012 Oct 17
0
[LLVMdev] R_ARM_ABS32 disassembly with integrated-as
...it. + bool IsThumb; + int64_t MappingSymbolCounter; /// @} void SetSection(StringRef Section, unsigned Type, unsigned Flags, SectionKind Kind) { @@ -130,18 +139,21 @@ private: ELF::SHF_WRITE |ELF::SHF_ALLOC, SectionKind::getDataRel()); EmitCodeAlignment(4, 0); + EmitMappingSymbol(/*IsData*/true); } void SetSectionText() { SetSection(".text", ELF::SHT_PROGBITS, ELF::SHF_EXECINSTR | ELF::SHF_ALLOC, SectionKind::getText()); EmitCodeAlignment(4, 0); + EmitMappingSymbol(/*IsData*/false);...
2012 Oct 16
2
[LLVMdev] R_ARM_ABS32 disassembly with integrated-as
Attached is an example of how to reproduce the issue. It uses a C file that happens to has a bunch of switch statements which are encoded as jump tables, giving us data-in-code. Usage: To build object files with clang via the -integrated-as versus via GCC: $ export NDK_DIR=<my_ndk_dir> $ export LLVM_DIR=<my_llvm_bin_dir> $ make To test that the generated objects contain the same
2016 Jun 22
2
x86: How to Force 2-byte `jmp` instruction in lowering
I have a bit of a riddle: In http://reviews.llvm.org/D19904 I'm trying to spell the following assembly: .palign 2, 0x90 jmp +0x9 nopw 512(%rax,%rax,1) // rest of the code I try the following snippet to accomplish this: OutStreamer->EmitLabel(CurSled); OutStreamer->EmitCodeAlignment(4); auto Target = OutContext.createLinkerPrivateTempSymbol(); // Use a two-byte `jmp`. This version of JMP takes an 8-bit relative offset as // an operand (computed as an offset from the jmp instruction). OutStreamer->EmitInstruction( MCInstBuilder(X86::JMP_1) .addExpr(M...
2010 Jul 16
0
[LLVMdev] Win32 COFF Support - Patch 3
...l32Value(const MCExpr *Value); > virtual void EmitValueToAlignment(unsigned ByteAlignment, int64_t Value, > - unsigned ValueSize, unsigned MaxBytesToEmit); > + unsigned ValueSize, unsigned MaxBytesToEmit); > virtual void EmitCodeAlignment(unsigned ByteAlignment, > unsigned MaxBytesToEmit); > virtual void EmitValueToOffset(const MCExpr *Offset, unsigned char Value); > @@ -79,11 +106,143 @@ WinCOFFStreamer::WinCOFFStreamer(MCContext &Context, > MCCo...
2010 Jul 14
2
[LLVMdev] Win32 COFF Support - Patch 3
On Sun, Jul 11, 2010 at 6:10 PM, Chris Lattner <clattner at apple.com> wrote: > This probably needs to be slightly tweaked to work with mainline.  I don't see anything objectionable, but I think Daniel needs to review this one. Updated patch to work with mainline. http://github.com/Bigcheese/llvm-mirror/commit/d19a4c82c18afc4830c09b70f02d162292231c94 - Michael Spencer