patchSimulavr: an AVR simulator - Patches: patch #7035, dependence on host byte order...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #7035: dependence on host byte order (endianity)

Submitter:  Petr Hluzin <petrh>
Submitted:  Sun 20 Dec 2009 09:09:46 PM UTC
   
 
Category:  bug fix Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Component Version:  simulavrxx

Sun 23 Jan 2011 10:10:23 PM UTC, comment #2: 

(Forgot to actually mark the closing.)

Petr Hluzin <petrh>
Group Member
Sun 23 Jan 2011 09:41:04 PM UTC, comment #1: 

Closing this as Done sit the fix was already commited in http://git.savannah.gnu.org/cgit/simulavr.git/commit/?id=fab8137dba0f9585e55ec3cfe9dc597c4d5bdb76

The commited change also does some whitespace-only changes.
Also I did use better name of 'GetWord()' instead of 'ReadMemWord()'.
And mine had an assert() there!

Petr Hluzin <petrh>
Group Member
Sun 20 Dec 2009 09:09:46 PM UTC, original submission:  

The problem was in casting
unsigned char * Memory::myMemory
to word which depends on host's integer byte order, the code did not work on big-endian machines.
I rewrote the cast to bit shifts and moved the conversions to new Flash::GetWord().

Petr Hluzin <petrh>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #19318:  845-byte-order.patch added by petrh (702B - text/x-patch)
file #19317:  855-byte-order.patch added by petrh (1KiB - text/x-patch)
file #19316:  844-byte-order.patch added by petrh (4KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by petrh (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-01-23 petrh StatusNone Done
        Open/ClosedOpen Closed
    2009-12-20 petrh Attached File- Added 844-byte-order.patch, #19316
        Attached File- Added 855-byte-order.patch, #19317
        Attached File- Added 845-byte-order.patch, #19318

    Back to the top

    Powered by Savane 3.13-0329.
    Corresponding source code