public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* help about new porting (.h file)
@ 2003-04-03 12:58 Gabriele Caracausi
  2003-04-03 12:59 ` Dave Hudson
  2003-04-04  0:05 ` tm_gccmail
  0 siblings, 2 replies; 5+ messages in thread
From: Gabriele Caracausi @ 2003-04-03 12:58 UTC (permalink / raw)
  To: GCC ML

Hi all, 

I'm working on GCC porting of PIC18C and I've a couple of questions. 

I'm studing ip2k porting because this is the most similar to PIC18C. 

I report from official "Using and Porting GCC" (p. 445), "Pmode is defined 
as an alias for the machine mode for pointers. On most machines, define this 
to be the integer mode corresponding to the width of a hardware pointer; 
SImode on 32 bit machine or DImode on 64-bit machines. [...] The width of 
Pmode must be at least as large as the value of POINTER_SIZE. If it is not 
equal you must define the macro POINTERS_EXTEND_UNSIGNED to specify how 
pointers are extended to Pmode." 

In the IP2k porting (ip2k.h):
* POINTER_SIZE is setted to 16 bit
* Pmode is setted to HImode
* INT_TYPE_SIZE is setted to 16 bit so HImode should be 8 bit.
* SHORT_TYPE_SIZE is setted to 16 bit (for information only) 

POINTERS_EXTEND_UNSIGNED isn't defined and so POINTER_SIZE must be equal to 
Pmode (as written in the manual...) 

# QUESTION 1
Why Pmode isn't at least as large as the value of POINTER_SIZE? 

In addition there's another thing:
In MODES_TIEBLE_P is written that QImode and HImode are readable as the same 
type and this should mean that they have both the same size, but if HImode 
is 16 bit wide QImode should be 8 bit wide and so they should not be 
"tieble" ... 

# QUESTION 2
Why this setting? 

This situation confuses me in writing my porting... 

Maybe for you are simple questions but I need your help for continuing my 
work ... 

Can you help me? 

Many thanks.
Gabriele Caracausi
Palermo (Italy) 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-04-04  0:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-03 12:58 help about new porting (.h file) Gabriele Caracausi
2003-04-03 12:59 ` Dave Hudson
2003-04-04  0:05 ` tm_gccmail
2003-04-04  1:26   ` Jonah Graham
2003-04-04  3:50     ` tm_gccmail

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).