Several fixes

This commit is contained in:
ceriel 1991-09-25 10:44:30 +00:00
parent c17ce93d9e
commit b40fd1c8d9
2 changed files with 14 additions and 30 deletions
mach/sparc/ce

View file

@ -749,7 +749,7 @@ C_dvi
a= b; a= b;
} }
b= alloc_reg(); b= alloc_reg();
"srl $a, $n_exp_str, $b"; "sra $a, $n_exp_str, $b";
free_reg(a); free_reg(a);
push_reg(b); push_reg(b);
} }
@ -1307,23 +1307,9 @@ C_fef_narg ==>
} }
else if (n==8) else if (n==8)
{ {
a= pop_reg(); flush_cache();
b= alloc_reg(); "call fef8";
c= alloc_reg(); "nop";
d= alloc_reg();
e= alloc_reg();
"srl $a, 20, $b";
"and $b, 0x7ff, $c";
"dec 0x3fe, $c";
"set 0x7ff00000, $b";
"andn $a, $b, $d";
"set 0x3fe00000, $b";
"or $d, $b, $e";
push_reg(e);
push_reg(c);
free_reg(a);
free_reg(b);
free_reg(d);
} }
else else
arg_error ("fef", n); arg_error ("fef", n);
@ -1352,17 +1338,8 @@ C_fef_narg ==>
"nop"; "nop";
"b 1f"; "b 1f";
"8:"; "8:";
"ld [$reg_sp], $a"; "call fef8";
"srl $a, 20, $b"; "nop";
"and $b, 0x7ff, $c";
"dec 0x3fe, $c";
"dec STACK_CLICK, $reg_sp";
"st $c, [$reg_sp]";
"set 0x7ff00000, $c";
"andn $a, $c, $a";
"set 0x3fe00000, $c";
"or $a, $c, $a";
"st $a, [$reg_sp+STACK_CLICK]";
"1:"; "1:";
free_reg(a); free_reg(a);
free_reg(b); free_reg(b);
@ -3334,7 +3311,8 @@ C_cms_narg ==>
{ {
b= NULL; b= NULL;
c= alloc_reg(); c= alloc_reg();
if (type_of_tos() == T_cst) if (type_of_tos() == T_cst &&
const13(top_const()))
{ {
pop_const(b_str); pop_const(b_str);
a= pop_reg(); a= pop_reg();
@ -4529,6 +4507,8 @@ C_str
$1 == 0 ==> $1 == 0 ==>
Comment( str , $1 ); Comment( str , $1 );
"ld [$reg_sp], $reg_lb"; "ld [$reg_sp], $reg_lb";
"add $reg_lb, 4, %fp";
"and %fp, -8, %fp";
"inc STACK_CLICK, $reg_sp" "inc STACK_CLICK, $reg_sp"
. .
$1 == 1 ==> $1 == 1 ==>

View file

@ -5,6 +5,10 @@ mach.h
#ifndef MACH_H #ifndef MACH_H
#define MACH_H #define MACH_H
#define con_str B_constr
#define rom_str B_romstr
#define gen_str B_genstr
#include "ctype.h" #include "ctype.h"
#include "mach_em.h" #include "mach_em.h"
#include "push_pop.h" #include "push_pop.h"