diff options
author | Andrew Waterman <waterman@s144.Millennium.Berkeley.EDU> | 2010-10-18 01:47:09 -0700 |
---|---|---|
committer | Andrew Waterman <waterman@s144.Millennium.Berkeley.EDU> | 2010-10-18 01:47:09 -0700 |
commit | 77c382ff239f61ee9846a7abb6d96a6434b52b56 (patch) | |
tree | 44be4c6cf17b74bd0d87c2498c5a781f9be11156 /pk/pk.c | |
parent | 68879a67d0f49323e1e2f8358d19bc1d94bb9f30 (diff) | |
download | riscv-pk-77c382ff239f61ee9846a7abb6d96a6434b52b56.zip riscv-pk-77c382ff239f61ee9846a7abb6d96a6434b52b56.tar.gz riscv-pk-77c382ff239f61ee9846a7abb6d96a6434b52b56.tar.bz2 |
[pk] improved performance of fp emulation
Diffstat (limited to 'pk/pk.c')
-rw-r--r-- | pk/pk.c | 22 |
1 files changed, 4 insertions, 18 deletions
@@ -130,25 +130,12 @@ void init_tf(trapframe_t* tf, long pc, long sp) tf->epc = USER_START; } -void init_fp() +static void bss_init() { - if (have_fp) - { - register long sr; - sr = mfpcr(PCR_SR); - mtpcr(sr | SR_EF, PCR_SR); - init_fpregs(); - mtpcr(sr, PCR_SR); - } -} - -void bss_init() -{ - extern char edata,end; - memset(&edata,0,&end-&edata); + // front-end server zeroes the bss automagically } -void mainvars_init() +static void mainvars_init() { sysret_t r = frontend_syscall(SYS_getmainvars, USER_MEM_SIZE-USER_MAINVARS_SIZE, USER_MAINVARS_SIZE, 0, 0); @@ -156,9 +143,8 @@ void mainvars_init() kassert(r.result == 0); } -void jump_usrstart() +static void jump_usrstart() { - init_fp(); trapframe_t tf; init_tf(&tf, USER_START, USER_MEM_SIZE-USER_MAINVARS_SIZE); pop_tf(&tf); |