Article View: gnu.gcc.help
Article #49700Optimization question
From: Robert L Krawitz
Date: Tue, 28 Dec 1993 01:42
Date: Tue, 28 Dec 1993 01:42
23 lines
1542 bytes
1542 bytes
Does anyone know how to make gcc NOT optimize this sort of expression: tempvar = *CURDEV.headaddr >> 16; tempvar = tempvar << 16; tempvar |= *CURDEV.patch_head_2 >> 16; break; The optimizer transforms this into various halfword loads and stores, but unfortunately the memory that this references is not addressable in quantities less than a full word, so the kernel (yup, this is kernel code) takes a bus error. Yes, it's possible to put temporary variables in, but this code seems to be all over the place. I don't want to turn off optimization altogether because this is in an interrupt handler. This is gcc 2.3.3 running on a sparc. Robert Krawitz <rlk@think.com> OS/IO Software Engineer (617)234-2116 Thinking Machines Corp. 245 First St. Cambridge, MA 02142 Member of the League for Programming Freedom -- mail lpf@uunet.uu.net Tall Clubs International -- tci-request@think.com or 1-800-521-2512
Technical Details
Message-ID:
<9312271918.AA29983@underprize.think.com>Path:
arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!math.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!think.com!rlkShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,6164fb20f70fc94b,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1993-12-27 17:41:41 PST Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!math.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!think.com!rlk From: rlk@think.com (Robert L Krawitz) Newsgroups: gnu.gcc.help Subject: Optimization question Date: 27 Dec 1993 20:42:10 -0500 Organization: GNUs Not Usenet Lines: 24 Sender: daemon@cis.ohio-state.edu Distribution: gnu Message-ID: <9312271918.AA29983@underprize.think.com>