This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

basic questions about GCC (porting GCC to a new target)


hi all,

i recently started to port GCC to a new 16bit risc microcontroller target.
i have defined all needed files and the compiler starts producing
assembler code.

at the moment i have problems understanding argument passing:

1.) although i define the argument pointer as a fixed register
    it is changed before function calls. the argument pointer
    should be changed by a function prologue/epilogue only.
    if i invoke the compiler with the option --fixed-ap
    this behavior vanishes.

	a) what could be the reason ?
	b) what are the gcc files related to function calls ?
	c) how to debug ?

2.) i see that the stack pointer is pushed to the stack although
    this makes no sense at all since it should be changed by 
    function epilogues/prologues only.

	a) possible reason ?
	b) how to debug ?

for any answer to my question i would be very happy !

	regards
		bernhard schaffer
		
bernhard schaffer
zweiackerstrasse 31
8053 zurich / CH

   
<mailto:bschaffer@evisioninc.ch>
  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]