dotgnu-pnet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: [Pnet-developers] Porting work remaining question


From: Peter Colson
Subject: Fwd: [Pnet-developers] Porting work remaining question
Date: Thu, 7 Oct 2004 16:01:33 +1000

Begin forwarded message:

More interestingly though:

stacktop(llx)= 80090dd2e8
&(stacktop[-CVM_WORDS_PER_LONG]) = 88090dd2e0
..
I'm missing something here - where are you getting
0x7FFFFFFF8 from?

88090dd2e0 > 80090dd2e8 (I'm assuming that you have
this in the printfs)

fprintf(stderr, ">>>>> stacktop(llx) = %llx",
stacktop);
fprintf(stderr, ">>>>>
&(stacktop[-CVM_WORDS_PER_LONG]) = %llx",
&(stacktop[-CVM_WORDS_PER_LONG]));

So then why are these two printf's showing so much
difference in value (my calc showed 0x7FFFFFFF8).

Indeed why?

I've gone back to this and can see (as you did):

stacktop = 0x80090dd2e8
&(stacktop[-CVM_WORDS_PER_LONG]) = 88090dd2e0

However,

stacktop-CVM_WORDS_PER_LONG = 80090dd2e0

which seems to make more sense. Now, are:

&(stacktop[-CVM_WORDS_PER_LONG])
stacktop-CVM_WORDS_PER_LONG

equivalent? At first glance I would have thought yes...which
makes the differences quite odd and it's in the second '8' of
'88090...'. I'll look into it more...

OK. I've found some strangeness:

If stacktop = 80040dd2e8

Then:

&(stacktop[-1]) = 80040dd2e0
stacktop-1 = 80040dd2e0

Which is the same. But using expanded CVM_WORDS_PER_LONG:

&(stacktop[-((sizeof(ILInt64) + sizeof(CVMWord) - 1) / sizeof(CVMWord))] = 88040dd2e0 stacktop-((sizeof(ILInt64) + sizeof(CVMWord) - 1) / sizeof(CVMWord)) = 80040dd2e0

Which re-introduces the difference seen above.

This seems to be either precedence (which I doubt as everything
including final result is bracketed prior to negation) or something
in the evaluation of 8+8-1/8? I'll keep looking, but if there's anything
obvious, let me know.


Regards,
Peter Colson.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]