Skip to main content

how to disable asm when compile the phoneME Ad for mipsel?

4 replies [Last post]
friver
Offline
Joined: 2010-08-11
Points: 0

when i compile the phoneME use qt for awt gui , I have some err like this:

==========================================================
[exec] Checking for test classes to compile ...
[exec] Checking for demo classes to compile ...
[exec] c++ /home/wpl/java/cdc/src/share/basis/native/awt/qt/QtFontMetrics.cpp
[exec] In file included from ../../src/linux/javavm/include/sync_md.h:36,
[exec] from ../../src/share/javavm/include/porting/sync.h:316,
[exec] from ../../src/linux/javavm/include/threads_md.h:36,
[exec] from ../../src/share/javavm/include/porting/threads.h:124,
[exec] from ../../src/share/basis/native/awt/qt/QtSync.h:43,
[exec] from ../../src/share/basis/native/awt/qt/QtApplication.h:41,
[exec] from ../../src/share/basis/native/awt/qt/QtFontMetrics.cpp:31:
[exec] ../../src/linux-mips/javavm/include/sync_arch.h:61: error: expected ',' or '...' before 'new'
[exec] ../../src/linux-mips/javavm/include/sync_arch.h:63: error: expected ',' or '...' before 'new'
[exec] make: *** [obj/QtFontMetrics.o] Error 1
======================================================================

and the sync_arch.h have :
=======================================================================
extern CVMAddr atomicCmpSwap(CVMAddr new, volatile CVMAddr *addr,CVMAddr old);

extern CVMAddr atomicSwap(CVMAddr new, volatile CVMAddr *addr);
=======================================================================

which define at atomic_mips.S:

/*
* CVMUint32 atomicSwap(CVMUint32 new, CVMUint32 *addr);
*/
ENTRY(atomicSwap)
1:
move t2,a0 /* we don't want to trash a0 */
ll v0,(a1) /* load prev content in v0 */
sc t2,(a1) /* store conditional new value */
beq t2,0,1b /* retry if changed inbetween */
jr ra
SET_SIZE(atomicSwap)

/*
* CVMUint32 atomicCmpSwap(CVMUint32 new, CVMUint32 *addr, CVMUint32 old);
*/
ENTRY(atomicCmpSwap)
1:
move t2,a0 /* we don't want to trash a0 */
ll v0,(a1) /* load prev content in v0 */
bne v0,a2,2f
sc t2,(a1) /* store conditional new value */
beq t2,0,1b /* retry if changed inbetween */
2:
jr ra
SET_SIZE(atomicCmpSwap)

I want to know why but have little message for asm ,so i want to disable the asm for mips ,HOW to do it?
or how to resolv this problem ?

I use a mips32 for the compile flag set.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
cjplummer
Offline
Joined: 2006-10-16
Points: 0

I just committed a fix by renaming new to new_value. This is what we do for linux/arm. Only sync_md.h needs to be changed, not the assembler implementation.

Hinkmond Wong

phonemeadvanced@mobileandembedded.org wrote:
> I just committed a fix by renaming new to new_value. This is what we do for linux/arm. Only sync_md.h needs to be changed, not the assembler implementation.
>

Thanks, Chris!

Hinkmond

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net

friver
Offline
Joined: 2010-08-11
Points: 0

yes. changed the 'new' to other word (I use 'new_value') , it's fine.

and if I disable the ASM in some .h file ,use the #undif _ASM ,it's can compile pass this error , but when the last use cross ld do somthing , the project report the jit_cpu.S have many err about the asm and c library head file.

so I think ,changed the new to other word ,is a good suggest for this .

Hinkmond Wong

phonemeadvanced@mobileandembedded.org wrote:
> when i compile the phoneME use qt for awt gui , I have some err like this:
>
> ==========================================================
> [exec] Checking for test classes to compile ...
> [exec] Checking for demo classes to compile ...
> [exec] c++ /home/wpl/java/cdc/src/share/basis/native/awt/qt/QtFontMetrics.cpp
> [exec] In file included from ../../src/linux/javavm/include/sync_md.h:36,
> [exec] from ../../src/share/javavm/include/porting/sync.h:316,
> [exec] from ../../src/linux/javavm/include/threads_md.h:36,
> [exec] from ../../src/share/javavm/include/porting/threads.h:124,
> [exec] from ../../src/share/basis/native/awt/qt/QtSync.h:43,
> [exec] from ../../src/share/basis/native/awt/qt/QtApplication.h:41,
> [exec] from ../../src/share/basis/native/awt/qt/QtFontMetrics.cpp:31:
> [exec] ../../src/linux-mips/javavm/include/sync_arch.h:61: error: expected ',' or '...' before 'new'
> [exec] ../../src/linux-mips/javavm/include/sync_arch.h:63: error: expected ',' or '...' before 'new'
> [exec] make: *** [obj/QtFontMetrics.o] Error 1
> ======================================================================
>
> and the sync_arch.h have :
> =======================================================================
> extern CVMAddr atomicCmpSwap(CVMAddr new, volatile CVMAddr *addr,CVMAddr old);
>
> extern CVMAddr atomicSwap(CVMAddr new, volatile CVMAddr *addr);
> =======================================================================
>

Hi friver,

The problem is that the word "new" is a reserved keyword operator in
C++. What C++ compiler are you using? Whichever C++ compiler you are
using should recognize that in that situation the word "new" is an
identifier, not the C++ operator called "new" and it should give you a
warning at least.

Did you try compiling with:

|-Wc++-compat

Hinkmond
|

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net