🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #52801

Re: memory mode

#52801
From: Alex Zatsman
Date: Tue, 05 May 1992 14:30
34 lines
1800 bytes
>> 2)  it compiles 
>> 		int x = 1;
>>     to 
>> 	(insn 8 7 10 (set (mem:QI (plus:SI (reg:SI 9)
>>                		(const_int -1)))
>>        		(const_int 1)) -1 (nil)
>>    	(nil))
>> 
>>     Why memory has QImode ?  what did I do wrong ?   the related macros
>>     are defined as following (they worked in version 1.4)
>> 
>> #define BITS_PER_UNIT 32
>> #define BITS_PER_WORD 32
>> #define UNITS_PER_WORD 1
>> 
>> #define INT_TYPE_SIZE 		32
>> #define SHORT_TYPE_SIZE 	INT_TYPE_SIZE
>> #define LONG_LONG_TYPE_SIZE 	INT_TYPE_SIZE
>> #define CHAR_TYPE_SIZE 		INT_TYPE_SIZE


I believe this happens because gcc tries to find the first (which it
hopes to be the smallest) machine mode into which the type will fit.
In your case this machine mode is QImode because it is normally the
first one in the list (see "machmode.def") and has the 32 bits
required for "int". The fact that it worked in 1.4 does not mean much
-- GNU people assume that you bytes (QImode) are smaller than you
integers and they explicitly said so in their gcc manual, at least in
its earlier releases. As far as I know it takes several kludges to get
around this problem.

Alex Zatsman.
Analog Devices, Inc.
Technical Details
Message-ID: <1992May5.143025.15475@spd.analog.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!analogdv!az
References: <9204220417.AA26906@vlsi.cs.caltech.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,e0596f3cf4ba365
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1992-05-05 07:30:25 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!sparky!uunet!analogdv!az
From: az@spd.analog.com (Alex Zatsman)
Subject: Re: memory mode
In-Reply-To: dong@vlsi.cs.caltech.edu's message of Tue, 21 Apr 1992 14: 17:27 GMT
Message-ID: <1992May5.143025.15475@spd.analog.com>
Organization: Analog Devices, Inc.
References: <9204220417.AA26906@vlsi.cs.caltech.edu>
Distribution: gnu
Date: Tue, 5 May 1992 14:30:25 GMT
Lines: 37