summaryrefslogtreecommitdiff
path: root/Source/Core/Common/x64Emitter.cpp
diff options
context:
space:
mode:
authorMatthew Parlane <parlane@gmail.com>2014-03-11 00:30:55 +1300
committerMatthew Parlane <parlane@gmail.com>2014-03-11 00:35:07 +1300
commit31cfc73a09a8685cbab20502b4bc132e98e2feb5 (patch)
treec7eb3a0906bab0eb711bd7c79166c96fe97ec488 /Source/Core/Common/x64Emitter.cpp
parent4591464486d696a300cc914f6c2a3cce8af2d666 (diff)
Fixes spacing for "for", "while", "switch" and "if"
Also moved && and || to ends of lines instead of start. Fixed misc vertical alignments and some { needed newlining.
Diffstat (limited to 'Source/Core/Common/x64Emitter.cpp')
-rw-r--r--Source/Core/Common/x64Emitter.cpp30
1 files changed, 16 insertions, 14 deletions
diff --git a/Source/Core/Common/x64Emitter.cpp b/Source/Core/Common/x64Emitter.cpp
index 6ba5e16c0f..e010802ea4 100644
--- a/Source/Core/Common/x64Emitter.cpp
+++ b/Source/Core/Common/x64Emitter.cpp
@@ -208,11 +208,12 @@ void OpArg::WriteRest(XEmitter *emit, int extraBytes, X64Reg _operandReg,
#if _M_X86_64
u64 ripAddr = (u64)emit->GetCodePtr() + 4 + extraBytes;
s64 distance = (s64)offset - (s64)ripAddr;
- _assert_msg_(DYNA_REC, (distance < 0x80000000LL
- && distance >= -0x80000000LL) ||
- !warn_64bit_offset,
- "WriteRest: op out of range (0x%" PRIx64 " uses 0x%" PRIx64 ")",
- ripAddr, offset);
+ _assert_msg_(DYNA_REC,
+ (distance < 0x80000000LL &&
+ distance >= -0x80000000LL) ||
+ !warn_64bit_offset,
+ "WriteRest: op out of range (0x%" PRIx64 " uses 0x%" PRIx64 ")",
+ ripAddr, offset);
s32 offs = (s32)distance;
emit->Write32((u32)offs);
#else
@@ -358,9 +359,9 @@ void XEmitter::JMP(const u8 *addr, bool force5Bytes)
{
s64 distance = (s64)(fn - ((u64)code + 5));
- _assert_msg_(DYNA_REC, distance >= -0x80000000LL
- && distance < 0x80000000LL,
- "Jump target too far away, needs indirect register");
+ _assert_msg_(DYNA_REC,
+ distance >= -0x80000000LL && distance < 0x80000000LL,
+ "Jump target too far away, needs indirect register");
Write8(0xE9);
Write32((u32)(s32)distance);
}
@@ -396,9 +397,10 @@ void XEmitter::CALLptr(OpArg arg)
void XEmitter::CALL(const void *fnptr)
{
u64 distance = u64(fnptr) - (u64(code) + 5);
- _assert_msg_(DYNA_REC, distance < 0x0000000080000000ULL
- || distance >= 0xFFFFFFFF80000000ULL,
- "CALL out of range (%p calls %p)", code, fnptr);
+ _assert_msg_(DYNA_REC,
+ distance < 0x0000000080000000ULL ||
+ distance >= 0xFFFFFFFF80000000ULL,
+ "CALL out of range (%p calls %p)", code, fnptr);
Write8(0xE8);
Write32(u32(distance));
}
@@ -456,9 +458,9 @@ void XEmitter::J_CC(CCFlags conditionCode, const u8 * addr, bool force5Bytes)
else
{
s64 distance = (s64)(fn - ((u64)code + 6));
- _assert_msg_(DYNA_REC, distance >= -0x80000000LL
- && distance < 0x80000000LL,
- "Jump target too far away, needs indirect register");
+ _assert_msg_(DYNA_REC,
+ distance >= -0x80000000LL && distance < 0x80000000LL,
+ "Jump target too far away, needs indirect register");
Write8(0x0F);
Write8(0x80 + conditionCode);
Write32((u32)(s32)distance);