Re: encoding info in mis-aligned pointers

2002-12-31 Thread Dan Sugalski
At 9:00 AM -0500 12/31/02, Jim Cromie wrote: Dan Sugalski wrote: You're looking to encode data in the low X bits (where X is 2 or 4 for 32 or 64 bit machines), right? yes- precisely! It's a clever thing to do, but one I admit I mistrust. Either it means we have to check every pointer that mi

Re: encoding info in mis-aligned pointers

2002-12-31 Thread Jim Cromie
Dan Sugalski wrote: At 7:35 AM -0500 12/31/02, Jim Cromie wrote: pardon the lack of clue I reveal here, but.. on 32 bit box, a void* has 3 values which are illegal/unaligned; void* ptr; if (ptr & 0x00) { /* ok */ } else { /* some exceptional situation */ } is there any concievable use

Re: encoding info in mis-aligned pointers

2002-12-31 Thread David Robins
On Tue, 31 Dec 2002, Jim Cromie wrote: > pardon the lack of clue I reveal here, but.. > > on 32 bit box, a void* has 3 values which are illegal/unaligned; > > void* ptr; > if (ptr & 0x00) { ITYM if(!(ptr & 0x3)) > /* ok */ > } else { > /* some exceptional situation */ > } > is there any

Re: encoding info in mis-aligned pointers

2002-12-31 Thread Dan Sugalski
At 7:35 AM -0500 12/31/02, Jim Cromie wrote: pardon the lack of clue I reveal here, but.. on 32 bit box, a void* has 3 values which are illegal/unaligned; void* ptr; if (ptr & 0x00) { /* ok */ } else { /* some exceptional situation */ } is there any concievable use of this which doesnt i

encoding info in mis-aligned pointers

2002-12-31 Thread Jim Cromie
pardon the lack of clue I reveal here, but.. on 32 bit box, a void* has 3 values which are illegal/unaligned; void* ptr; if (ptr & 0x00) { /* ok */ } else { /* some exceptional situation */ } is there any concievable use of this which doesnt interfere with legitimate bus-errors (ie exi