Merge pull request #30 from TASEmulators/mergeTASEmulators
Fix building for clang
This commit is contained in:
commit
8c03af6c6f
|
@ -475,6 +475,7 @@ uint8_t clock_table[256] = {
|
||||||
7 // F
|
7 // F
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// This optimization is only possible with the GNU compiler -- MSVC does not allow function alignment
|
// This optimization is only possible with the GNU compiler -- MSVC does not allow function alignment
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
__attribute__((optimize("align-functions=1024")))
|
__attribute__((optimize("align-functions=1024")))
|
||||||
|
@ -1479,7 +1480,7 @@ end:
|
||||||
CALC_STATUS(temp);
|
CALC_STATUS(temp);
|
||||||
r.status = temp;
|
r.status = temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->clock_count = clock_count;
|
this->clock_count = clock_count;
|
||||||
r.pc = pc;
|
r.pc = pc;
|
||||||
r.sp = GET_SP();
|
r.sp = GET_SP();
|
||||||
|
|
|
@ -83,7 +83,12 @@ class Cpu
|
||||||
result_badop // unimplemented/illegal instruction
|
result_badop // unimplemented/illegal instruction
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// This optimization is only possible with the GNU compiler -- MSVC does not allow function alignment
|
||||||
|
#if defined(__GNUC__) || defined(__clang__)
|
||||||
|
result_t run(nes_time_t end_time) __attribute__((aligned(1024)));
|
||||||
|
#else
|
||||||
result_t run(nes_time_t end_time);
|
result_t run(nes_time_t end_time);
|
||||||
|
#endif
|
||||||
|
|
||||||
nes_time_t time() const { return clock_count; }
|
nes_time_t time() const { return clock_count; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue