summaryrefslogtreecommitdiff
path: root/bridges/source/cpp_uno/gcc3_linux_sparc
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2013-06-04 13:24:59 +0200
committerLuboš Luňák <l.lunak@suse.cz>2013-06-05 16:01:43 +0200
commit6b8393474974d2af7a2cb3c47b3d5c081b550bdb (patch)
tree06f801a497d0a33161996fdfca10398a59b229fa /bridges/source/cpp_uno/gcc3_linux_sparc
parent8d48e779d330755000c0d896bbb95290af453ba6 (diff)
fix gcc inline assembler operands usage
Apparently whoever did these didn't get the gcc docs and specified every operand only as input, and then added volatile, explicit initialization and what not until it worked. Specify output operands correctly instead. I couldn't verify all assembler variants, as I don't know them, but the ones I don't know had at least some proper usage of output operands, so I'll assume those are all correct. Change-Id: I2910308b5e00cce8db756496df50ed26cfe35bb6
Diffstat (limited to 'bridges/source/cpp_uno/gcc3_linux_sparc')
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx19
1 files changed, 11 insertions, 8 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx
index 37b00d258ad1..1a73ed5188ee 100644
--- a/bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx
@@ -70,9 +70,9 @@ void callVirtualMethod( void * pAdjustedThisPtr,
// never called
if (! pAdjustedThisPtr) CPPU_CURRENT_NAMESPACE::dummy_can_throw_anything("xxx"); // address something
- volatile long o0 = 0, o1 = 0; // for register returns
- volatile double f0d = 0;
- volatile float f0f = 0;
+ long o0, o1; // for register returns
+ double f0d;
+ float f0f;
volatile long long saveReg[7];
__asm__ (
@@ -231,12 +231,15 @@ void callVirtualMethod( void * pAdjustedThisPtr,
"ldd [%%l7], %%o4\n\t"
"add %%l7, 8, %%l7\n\t"
"ldd [%%l7], %%l6\n\t"
- : :
- "m"(o0),
- "m"(o1),
- "m"(f0d),
- "m"(f0f),
+ :
+ "=m"(o0),
+ "=m"(o1),
+ "=m"(f0d),
+ "=m"(f0f),
+ :
"r"(&saveReg[0])
+ :
+ "memory"
);
switch( eReturnType )
{