Skip to Content.
Sympa Menu

svadev - [svadev] Fwd: BBC _barebone_boundscheck function

svadev AT lists.siebelschool.illinois.edu

Subject: Svadev mailing list

List archive

[svadev] Fwd: BBC _barebone_boundscheck function


Chronological Thread 
  • From: Baozeng <sploving1 AT gmail.com>
  • To: svadev AT cs.illinois.edu
  • Subject: [svadev] Fwd: BBC _barebone_boundscheck function
  • Date: Thu, 24 May 2012 22:52:44 +0800
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/svadev>
  • List-id: <svadev.cs.uiuc.edu>



2012/5/24 Baozeng <sploving1 AT gmail.com>
Another thing, I change BBRuntime.h as the following:
#if defined(i386) || defined(__i386__)
  #define UNSET_MASK 0xbfffffff
  #define SET_MASK 0xc0000000
#else
  #define UNSET_MASK 0x7fffffffffff
  #define SET_MASK 0xffff800000000000
#endif
Then
 Dest = (Dest | SET_MASK); should works like this:
if Dest = 0x891234; then after the above statement it should be 0xc0891234. But it does not work. The result is not changed, 0x891234, why?
I use printf("SET_MASK is %d", SET_MASK); It prints
SET_MASK is 0. any suggestion?



2012/5/24 Baozeng <sploving1 AT gmail.com>
Hello,
I cannot understand the following code in function _barebone_boundscheck defined in BaggyBoundsCheck.cpp:

if (val) {
 
    if (Source & SET_MASK) {  // If I understand correctly, this means that Source is OOB pointer.

      Source = Source & UNSET_MASK;
      if (Source & 0x8) {//  Could you explain me why add or sub 16?
        Source += 16;
      } else {
        Source -= 16;
      }
      Dest = Dest & UNSET_MASK;


--
     Best Regards,
                                                                 Baozeng Ding
                                                                 OSTG,NFS,ISCAS



--
     Best Regards,
                                                                 Baozeng Ding
                                                                 OSTG,NFS,ISCAS





--
     Best Regards,
                                                                 Baozeng Ding
                                                                 OSTG,NFS,ISCAS





Archive powered by MHonArc 2.6.16.

Top of Page