diff mc-code-powerpc.c @ 420:efbd420386c5

non aligned bitfield (not yet finished)
author kono
date Thu, 28 Oct 2004 21:20:52 +0900
parents c73f013d07d7
children 8b9136a06f56
line wrap: on
line diff
--- a/mc-code-powerpc.c	Wed Oct 27 09:04:07 2004 +0900
+++ b/mc-code-powerpc.c	Thu Oct 28 21:20:52 2004 +0900
@@ -5218,7 +5218,7 @@
 { 
     int sign=0,bitsz; 
     int align,l=0;
-    switch(cadr(type)) { 
+    switch(cadr(type)) {   /* value type */
     case INT:		sign=1; bitsz=32; align=4;break; 
     case UNSIGNED:		bitsz=32; align=4;break; 
     case CHAR:          sign=1; bitsz= 8; align=1;break; 
@@ -5248,7 +5248,7 @@
     int bitpos = *bfd;
     int offset = *poffset;
     int l;
-    int bitsize = cadddr(type);
+    int bitsize = caddr(caddr(type));
     set_bitsz(type,&sign,&bitsz,&align,&l);
 
     if (bitsize>bitsz) { error(BTERR); bitsize = i; }
@@ -5293,7 +5293,7 @@
 code_bit_field(int type,int bitpos,int reg)
 {
     int sign,bitsz,l,align;
-    int bitsize = cadddr(type);
+    int bitsize = caddr(caddr(type));
     int i;
     set_bitsz(type,&sign,&bitsz,&align,&l);
 // printf("# %d: bitpos=%d bitsize=%d bitsz=%d\n",lineno,bitpos,bitsize,bitsz);
@@ -5338,7 +5338,7 @@
 code_bit_replace(int value,int lvalue,int type,int bitpos)
 {
     int sign,bitsz,l,align;
-    int bitsize = cadddr(type);
+    int bitsize = caddr(caddr(type));
     int mask = 0;
     int tmp = -1;
     int i;
@@ -5411,7 +5411,7 @@
 code_bit_replace_const(int value,int lvalue,int type,int bitpos)
 {
     int sign,bitsz,l,align;
-    int bitsize = cadddr(type);
+    int bitsize = caddr(caddr(type));
     int mask = 0;
     int i;
     int c;