From: Michael H. <mic...@ea...> - 2000-02-17 05:26:27
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ok, I've traced it down but I dont understand it. The flow is: * geniCodeCall (actually sets parmBytes) from the result of: * geniCodeParms which generates a 'stack' size from summing the size of all stack pushed parms. This is from the result of: * ...many calls to getSize() getSize is where things break. getSize is basically: if IS_SPEC(p) (is a char, short, int, long...) return sizeof(p); else is a pointer to something. return sizeof(POINTER in appropriate space) The problem is that its dereferencing the paramater down to a char, so IS_SPEC is true, and sizeof(char) is returned instead of sizeof(char *) Thats where I get lost. I cant find where the 'class' is actually set, and the diffs against two weeks ago look fine to my untrained eye. Yeah. I'll keep hunting. My notes are in doc/random-notes.txt. - -- Michael -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.0 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE4q4XmUejL3SuzxEgRAnlRAKCXtkvFvo/4Stv/qb+rpYKmA5xCKgCfSP2D 5HIiLVzSd39sgWHVpUOzTqo= =DZcH -----END PGP SIGNATURE----- |
From: Kevin V. <kv...@en...> - 2000-02-18 18:57:47
|
Michael, I've got it a little further, though I still don't fully understand it: the bad guy is geniCodeSEParms(). If you comment out the call to geniCodeSEParms() in geniCodeCall(), it works properly. According to the comments, geniCodeSEParms should only make a difference on parameters with side-effects (like parameters generated by function calls). This obviously isn't true at the moment. Still looking, but this is the first real clue I've found... Peace, Kevin |
From: Kevin V. <ke...@vi...> - 2000-02-18 22:36:26
|
I've tried to understand what geniCodeSEParms does, and utterly failed (Sandeep?). But if it's description can be believed, it should be useless in the --stack-auto case, since it is concerned with overlaying parameters to function calls, which obviously doesn't apply when the parameters are all on the stack. So I propose the following fix: only call geniCodeSEParms from geniCodeCall if we're not in --stack-auto mode, like so: /* take care of parameters with side-effecting function calls in them, this is required to take care of overlaying function parameters */ if (!options.stackAuto) { geniCodeSEParms ( parms ); } This works for me. Peace, Kevin |
From: Sandeep D. <sa...@dd...> - 2000-02-18 22:46:12
|
Hi Kevin , That sounds good for the time being will take a look this weekend..have beena little busy @ work so did have time to investigate it... The SE parms should always be executed .. that sounds right.. Sandeep > > I've tried to understand what geniCodeSEParms does, and utterly > failed (Sandeep?). > > But if it's description can be believed, it should be useless in > the --stack-auto case, since it is concerned with overlaying > parameters to function calls, which obviously doesn't apply when the > parameters are all on the stack. > > So I propose the following fix: only call geniCodeSEParms from > geniCodeCall if we're not in --stack-auto mode, like so: > > /* take care of parameters with side-effecting > function calls in them, this is required to take care > of overlaying function parameters */ > if (!options.stackAuto) > { > geniCodeSEParms ( parms ); > } > > This works for me. > > Peace, > Kevin > > _______________________________________________ > sdcc-devel mailing list > sdc...@li... > http://lists.sourceforge.net/mailman/listinfo/sdcc-devel -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sandeep Dutta Phone: 650-356-5417 Diab-SDS Fax: 650-356-5490 323 Vintage Park Drive Email: sa...@dd... Foster City, CA 94404 URL: www.ddi.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |