diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-07-18 19:35:16 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-07-18 19:35:16 +0000 |
commit | df9495390acc19c883684c2ab83271f07a7321b9 (patch) | |
tree | a4aca1dc00c8fe9d241f59ac14f7d8c55c50dc88 /lib/MC/MCDisassembler | |
parent | 32d75bec4bbbd97b70d887ed3c106951b1d18182 (diff) | |
download | external_llvm-df9495390acc19c883684c2ab83271f07a7321b9.zip external_llvm-df9495390acc19c883684c2ab83271f07a7321b9.tar.gz external_llvm-df9495390acc19c883684c2ab83271f07a7321b9.tar.bz2 |
Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160445 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCDisassembler')
-rw-r--r-- | lib/MC/MCDisassembler/EDMain.cpp | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/lib/MC/MCDisassembler/EDMain.cpp b/lib/MC/MCDisassembler/EDMain.cpp index c658717..5c065db 100644 --- a/lib/MC/MCDisassembler/EDMain.cpp +++ b/lib/MC/MCDisassembler/EDMain.cpp @@ -4,7 +4,7 @@ // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This file implements the enhanced disassembler's public C API. @@ -34,9 +34,9 @@ int EDGetDisassembler(EDDisassemblerRef *disassembler, Syntax = EDDisassembler::kEDAssemblySyntaxARMUAL; break; } - + EDDisassemblerRef ret = EDDisassembler::getDisassembler(triple, Syntax); - + if (!ret) return -1; *disassembler = ret; @@ -70,18 +70,18 @@ unsigned int EDCreateInsts(EDInstRef *insts, uint64_t address, void *arg) { unsigned int index; - + for (index = 0; index < count; ++index) { EDInst *inst = ((EDDisassembler*)disassembler)->createInst(byteReader, address, arg); - + if (!inst) return index; - + insts[index] = inst; address += inst->byteSize(); } - + return count; } @@ -165,14 +165,14 @@ int EDTokenIsRegister(EDTokenRef token) { int EDTokenIsNegativeLiteral(EDTokenRef token) { if (((EDToken*)token)->type() != EDToken::kTokenLiteral) return -1; - + return ((EDToken*)token)->literalSign(); } int EDLiteralTokenAbsoluteValue(uint64_t *value, EDTokenRef token) { if (((EDToken*)token)->type() != EDToken::kTokenLiteral) return -1; - + return ((EDToken*)token)->literalAbsoluteValue(*value); } @@ -180,7 +180,7 @@ int EDRegisterTokenValue(unsigned *registerID, EDTokenRef token) { if (((EDToken*)token)->type() != EDToken::kTokenRegister) return -1; - + return ((EDToken*)token)->registerID(*registerID); } @@ -231,7 +231,7 @@ struct ByteReaderWrapper { EDByteBlock_t byteBlock; }; -static int readerWrapperCallback(uint8_t *byte, +static int readerWrapperCallback(uint8_t *byte, uint64_t address, void *arg) { struct ByteReaderWrapper *wrapper = (struct ByteReaderWrapper *)arg; @@ -245,13 +245,9 @@ unsigned int EDBlockCreateInsts(EDInstRef *insts, uint64_t address) { struct ByteReaderWrapper wrapper; wrapper.byteBlock = byteBlock; - - return EDCreateInsts(insts, - count, - disassembler, - readerWrapperCallback, - address, - (void*)&wrapper); + + return EDCreateInsts(insts, count, disassembler, readerWrapperCallback, + address, (void*)&wrapper); } int EDBlockEvaluateOperand(uint64_t *result, EDOperandRef operand, |