weird staff in binutils symbol value caculation

Ian Lance Taylor iant@google.com
Thu May 6 18:31:00 GMT 2010


daniel tian <daniel.xntian@gmail.com> writes:

>           I just ported the binutils to my NEW RISC machine. Now the
> assemble codes were compiled with this tools.
>           But here is the stuff I just found out:
>           .equ	REF_FRAMES_BUFFER_SIZE			,
> ((6*DISPLAY_SCALED)+(12*(DISPLAY_SCALED==NO)))
>            When the DISPLAY_SCALED and DISPLAY_SCALED, and NO are 0x0.
>            But the value REF_FRAMES_BUFFER_SIZE is to be -12.

You aren't writing C code, and there is no particular reason that the
boolean truth value should be 1.  In fact, the value of -1 is
documented.  If you want a 1, then write a 1.

Ian



More information about the Binutils mailing list