Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/macournoyer/tinyrb
Browse files Browse the repository at this point in the history
  • Loading branch information
singpolyma committed Apr 2, 2009
2 parents a874a3d + a362ce6 commit 299b647
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
4 changes: 4 additions & 0 deletions BUGS
@@ -0,0 +1,4 @@
Failures on Fedora x86_64, reported by postmodern
http://rafb.net/p/4L3z3Y69.html
http://rafb.net/p/zp9cth25.html
http://rafb.net/p/NYeXnd29.html
12 changes: 11 additions & 1 deletion vm/config.h
Expand Up @@ -13,4 +13,14 @@
/* enable CallSite optimization */ /* enable CallSite optimization */
#define TR_CALL_SITE #define TR_CALL_SITE


#define MAX_INT (INT_MAX-2) /* maximum value of an int (-2 for safety) */ #define MAX_INT (INT_MAX-2) /* maximum value of an int (-2 for safety) */

/* TR_BITSINT defines the number of bits in an int. */
#if INT_MAX-20 < 32760
#define TR_BITSINT 16
#elif INT_MAX > 2147483640L
/* int has at least 32 bits */
#define TR_BITSINT 32
#else
#error "you must define TR_BITSINT with number of bits in an integer"
#endif
5 changes: 5 additions & 0 deletions vm/opcode.h
Expand Up @@ -15,8 +15,13 @@
#define POS_B (POS_C + SIZE_C) #define POS_B (POS_C + SIZE_C)
#define POS_Bx POS_C #define POS_Bx POS_C


#if SIZE_Bx < TR_BITSINT-1
#define MAXARG_Bx ((1<<SIZE_Bx)-1) #define MAXARG_Bx ((1<<SIZE_Bx)-1)
#define MAXARG_sBx (MAXARG_Bx>>1) /* `sBx' is signed */ #define MAXARG_sBx (MAXARG_Bx>>1) /* `sBx' is signed */
#else
#define MAXARG_Bx MAX_INT
#define MAXARG_sBx MAX_INT
#endif


/* creates a mask with `n' 1 bits at position `p' */ /* creates a mask with `n' 1 bits at position `p' */
#define MASK1(n,p) ((~((~(TrInst)0)<<n))<<p) #define MASK1(n,p) ((~((~(TrInst)0)<<n))<<p)
Expand Down

0 comments on commit 299b647

Please sign in to comment.