diff options
| author | Ian Rogers <irogers@google.com> | 2014-06-13 16:38:24 -0700 |
|---|---|---|
| committer | Ian Rogers <irogers@google.com> | 2014-06-13 17:41:58 -0700 |
| commit | 5aa6e04061ced68cca8111af1e9c19781b8a9c5d (patch) | |
| tree | df6e23da05e2cab8c591ff420b0cd16a71f9dea6 /compiler/dex/quick/x86/codegen_x86.h | |
| parent | b2192ffe6897da6bfd6165db7ce476cba1cd07ae (diff) | |
| download | android_art-5aa6e04061ced68cca8111af1e9c19781b8a9c5d.tar.gz android_art-5aa6e04061ced68cca8111af1e9c19781b8a9c5d.tar.bz2 android_art-5aa6e04061ced68cca8111af1e9c19781b8a9c5d.zip | |
Tidy x86 assembler.
Use helper functions to compute when the kind has a SIB, a ModRM and RegReg
form.
Change-Id: I86a5cb944eec62451c63281265e6974cd7a08e07
Diffstat (limited to 'compiler/dex/quick/x86/codegen_x86.h')
| -rw-r--r-- | compiler/dex/quick/x86/codegen_x86.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/compiler/dex/quick/x86/codegen_x86.h b/compiler/dex/quick/x86/codegen_x86.h index a92608fadc..3540843705 100644 --- a/compiler/dex/quick/x86/codegen_x86.h +++ b/compiler/dex/quick/x86/codegen_x86.h @@ -121,7 +121,7 @@ class X86Mir2Lir : public Mir2Lir { std::string BuildInsnString(const char* fmt, LIR* lir, unsigned char* base_addr); ResourceMask GetPCUseDefEncoding() const OVERRIDE; uint64_t GetTargetInstFlags(int opcode); - int GetInsnSize(LIR* lir); + size_t GetInsnSize(LIR* lir) OVERRIDE; bool IsUnconditionalBranch(LIR* lir); // Check support for volatile load/store of a given size. @@ -392,16 +392,13 @@ class X86Mir2Lir : public Mir2Lir { protected: size_t ComputeSize(const X86EncodingMap* entry, int32_t raw_reg, int32_t raw_index, - int32_t raw_base, bool has_sib, bool r8_form, bool r8_reg_reg_form, - int32_t displacement); + int32_t raw_base, int32_t displacement); void CheckValidByteRegister(const X86EncodingMap* entry, int32_t raw_reg); void EmitPrefix(const X86EncodingMap* entry, - int32_t raw_reg_r, int32_t raw_reg_x, int32_t raw_reg_b, - bool r8_form_r, bool modrm_is_reg_reg); + int32_t raw_reg_r, int32_t raw_reg_x, int32_t raw_reg_b); void EmitOpcode(const X86EncodingMap* entry); void EmitPrefixAndOpcode(const X86EncodingMap* entry, - int32_t reg_r, int32_t reg_x, int32_t reg_b, bool r8_form, - bool modrm_is_reg_reg); + int32_t reg_r, int32_t reg_x, int32_t reg_b); void EmitDisp(uint8_t base, int32_t disp); void EmitModrmThread(uint8_t reg_or_opcode); void EmitModrmDisp(uint8_t reg_or_opcode, uint8_t base, int32_t disp); |
