bugGNU Development Chain for 68HC11/68HC12 - Bugs: bug #8120, Clear a word is not atomic on...

 
 

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

bug #8120: Clear a word is not atomic on 68hc12

Submitter:  Stephane Carrez <ciceron>
Submitted:  Thu 11 Mar 2004 07:39:22 PM UTC
   
 
Category:  gcc Severity:  4 - Important
Item Group:  sw-bug Status:  Fixed
Privacy:  Public Assigned to:  ciceron
Open/Closed:  Closed

Sun 29 Aug 2004 08:00:24 PM UTC, comment #1: 

Fixed in r2.92.

Stephane Carrez <ciceron>
Group administrator
Thu 11 Mar 2004 07:39:22 PM UTC, original submission:  

From sssjjjnnn@comcast.net:

I noticed some strange behavior in gcc. The following code:

void myfunc() {
  (volatile unsigned)0x8000 = 0;
}

Compiles to:

clr -32767
clr -32768
rtc

It seems that the compiler is converting a 2-byte volatile access into two
1-byte accesses, which is probably not a good idea. The command line I used
to compile is:

m6811-elf-g++.exe -S -mshort -m68hcs12 -fomit-frame -pointer -fno-rtti
-frename-registers -mlong-calls -O2 x.cc

Is there a way to tell the compiler that you want to do a 2-byte access,
e.g. with a movw?

-- Justin



Stephane Carrez <ciceron>
Group administrator

 

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

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2004-08-29 ciceron StatusNone Fixed
    Open/ClosedOpen Closed

Back to the top

Powered by Savane 3.14-f13d.
Corresponding source code