lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Luiz Henrique de Figueiredo wrote:
A small point of interest.  When working the Xbox 360, the above 
endianness didn't work using a local variable.
    
In what sense did it not work?

Anyway, could you please try this?
	volatile int x = 1;

(A *local* volatile var.)
  
It simply returned the wrong result.  If I had understood PowerPC assembly better at the time, I might be able to tell you why.  Perhaps it was a compiler bug, although it still continued to return the wrong result 6 months after I made the change in the first place.

In any case, as of a month ago, I don't have access to Xbox 360s anymore.  If there is someone else on this list working with Xbox 360s, perhaps they can give it a try and see if it is an issue anymore.

(The 'volatile' is an interesting trick.  I should have thought about doing that in the first place.)

Josh