mirror of https://github.com/PCSX2/pcsx2.git
linux compilation fix:
* use c++11 for pcsx2 * rename __rdtsc so I won't conflict with gnu version * add a bunch of .data() method to get string data git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5913 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
c374343ae9
commit
220f55d760
|
@ -843,7 +843,9 @@ static __inline__ __attribute__((always_inline)) unsigned long long __xgetbv(uns
|
|||
return ((unsigned long long)edx << 32) | eax;
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((always_inline)) unsigned long long __rdtsc(void)
|
||||
// gcc 4.8 define __rdtsc but unfortunately the compiler crash...
|
||||
// The redefine allow to skip the gcc __rdtsc version -- Gregory
|
||||
static __inline__ __attribute__((always_inline)) unsigned long long __pcsx2__rdtsc(void)
|
||||
{
|
||||
unsigned long long retval;
|
||||
__asm__ __volatile__("rdtsc" : "=A"(retval));
|
||||
|
|
|
@ -93,12 +93,12 @@ s64 x86capabilities::_CPUSpeedHz( u64 time ) const
|
|||
|
||||
do {
|
||||
timeStart = GetCPUTicks();
|
||||
startCycle = __rdtsc();
|
||||
startCycle = __pcsx2__rdtsc();
|
||||
} while( GetCPUTicks() == timeStart );
|
||||
|
||||
do {
|
||||
timeStop = GetCPUTicks();
|
||||
endCycle = __rdtsc();
|
||||
endCycle = __pcsx2__rdtsc();
|
||||
} while( ( timeStop - timeStart ) < time );
|
||||
|
||||
s64 cycleCount = endCycle - startCycle;
|
||||
|
|
|
@ -19,6 +19,7 @@ set(CommonFlags
|
|||
-fno-tree-dse
|
||||
-fno-strict-aliasing
|
||||
-Wstrict-aliasing # Allow to track strict aliasing issue.
|
||||
-std=c++0x
|
||||
-pipe)
|
||||
|
||||
if (SPARSEHASH_NEW_FOUND)
|
||||
|
|
|
@ -232,7 +232,7 @@ bool BreakpointWindow::fetchDialogData()
|
|||
wxCharBuffer addressText = editAddress->GetLabel().ToUTF8();
|
||||
if (cpu->initExpression(addressText,exp) == false)
|
||||
{
|
||||
swprintf(errorMessage,512,L"Invalid expression \"%s\".",editAddress->GetLabel().wchar_str());
|
||||
swprintf(errorMessage,512,L"Invalid expression \"%s\".",editAddress->GetLabel().wchar_str().data());
|
||||
wxMessageBox(errorMessage,L"Error",wxICON_ERROR);
|
||||
return false;
|
||||
}
|
||||
|
@ -240,7 +240,7 @@ bool BreakpointWindow::fetchDialogData()
|
|||
u64 value;
|
||||
if (cpu->parseExpression(exp,value) == false)
|
||||
{
|
||||
swprintf(errorMessage,512,L"Invalid expression \"%s\".",editAddress->GetLabel().wchar_str());
|
||||
swprintf(errorMessage,512,L"Invalid expression \"%s\".",editAddress->GetLabel().wchar_str().data());
|
||||
wxMessageBox(errorMessage,L"Error",wxICON_ERROR);
|
||||
return false;
|
||||
}
|
||||
|
@ -252,14 +252,14 @@ bool BreakpointWindow::fetchDialogData()
|
|||
wxCharBuffer sizeText = editSize->GetLabel().ToUTF8();
|
||||
if (cpu->initExpression(sizeText,exp) == false)
|
||||
{
|
||||
swprintf(errorMessage,512,L"Invalid expression \"%s\".",editSize->GetLabel().wchar_str());
|
||||
swprintf(errorMessage,512,L"Invalid expression \"%s\".",editSize->GetLabel().wchar_str().data());
|
||||
wxMessageBox(errorMessage,L"Error",wxICON_ERROR);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (cpu->parseExpression(exp,value) == false)
|
||||
{
|
||||
swprintf(errorMessage,512,L"Invalid expression \"%s\".",editSize->GetLabel().wchar_str());
|
||||
swprintf(errorMessage,512,L"Invalid expression \"%s\".",editSize->GetLabel().wchar_str().data());
|
||||
wxMessageBox(errorMessage,L"Error",wxICON_ERROR);
|
||||
return false;
|
||||
}
|
||||
|
@ -276,7 +276,7 @@ bool BreakpointWindow::fetchDialogData()
|
|||
{
|
||||
if (cpu->initExpression(condition,compiledCondition) == false)
|
||||
{
|
||||
swprintf(errorMessage,512,L"Invalid expression \"%s\".",editCondition->GetLabel().wchar_str());
|
||||
swprintf(errorMessage,512,L"Invalid expression \"%s\".",editCondition->GetLabel().wchar_str().data());
|
||||
wxMessageBox(errorMessage,L"Error",wxICON_ERROR);
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue