Mercurial > hg > CbC > old > device
comparison mc-code-powerpc.c @ 444:8bec605d1701
small sized struct
author | kono |
---|---|
date | Sun, 21 Nov 2004 11:20:56 +0900 |
parents | a531bbf572e3 |
children | 5ec2a88b9f4d |
comparison
equal
deleted
inserted
replaced
443:f2d2e27a00a0 | 444:8bec605d1701 |
---|---|
33 static void data_mode(char *name); | 33 static void data_mode(char *name); |
34 static void text_mode(); | 34 static void text_mode(); |
35 static void ld_indexx(int byte, int n, int xreg,int reg,int sign); | 35 static void ld_indexx(int byte, int n, int xreg,int reg,int sign); |
36 static void local_table(void); | 36 static void local_table(void); |
37 static void shift(char *op, int creg,int reg); | 37 static void shift(char *op, int creg,int reg); |
38 static int struct_push(int e4,int t,int arg); | 38 static int push_struct(int e4,int t,int arg); |
39 | 39 |
40 | 40 |
41 static int creg; | 41 static int creg; |
42 | 42 |
43 static int output_mode = TEXT_EMIT_MODE; | 43 static int output_mode = TEXT_EMIT_MODE; |
1567 } | 1567 } |
1568 free_register(dreg); | 1568 free_register(dreg); |
1569 } | 1569 } |
1570 | 1570 |
1571 int | 1571 int |
1572 struct_push(int e4,int t,int arg) | 1572 push_struct(int e4,int t,int arg) |
1573 { | 1573 { |
1574 int length,count; | 1574 int length,count; |
1575 int dreg,sreg; char *drn,*crn,*srn; | 1575 int dreg,sreg; char *drn,*crn,*srn; |
1576 g_expr(e4); | 1576 g_expr(e4); |
1577 if (!is_int_reg(creg)) error(-1); | 1577 if (!is_int_reg(creg)) error(-1); |
2035 for(stargs=reverse0(stargs);stargs;stargs = cadr(stargs)) { | 2035 for(stargs=reverse0(stargs);stargs;stargs = cadr(stargs)) { |
2036 e3 = car(stargs); | 2036 e3 = car(stargs); |
2037 e4 = car(e3); | 2037 e4 = car(e3); |
2038 t = caddr(e3); | 2038 t = caddr(e3); |
2039 arg = get_input_arg(t,AS_ARG,caddr(stargs),cadddr(stargs),0); | 2039 arg = get_input_arg(t,AS_ARG,caddr(stargs),cadddr(stargs),0); |
2040 struct_push(e4,t,arg); | 2040 push_struct(e4,t,arg); |
2041 car(e3)=0; // done | 2041 car(e3)=0; // done |
2042 } | 2042 } |
2043 } else { | 2043 } else { |
2044 // last complex argument can use input register | 2044 // last complex argument can use input register |
2045 if (complex_) { | 2045 if (complex_) { |