diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-07-08 02:13:16 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-07-08 02:13:16 +0200 |
commit | fcb9abccbbc73a4f449d55c2c7fb369db2ad139d (patch) | |
tree | 397902659c399e97c14e5d5dd68c3cb761236649 /sys | |
parent | 63879193e7e0d271daa215b02d6c4f64c98dc6ae (diff) |
5e: enable VFP emulation by default, doubles only need to be 4 byte aligned
this adds -F flag to 5e (same as 5l) to disable VFP emulation
and makes VFP emulation the default.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/man/1/5e | 12 | ||||
-rw-r--r-- | sys/src/cmd/5e/5e.c | 4 | ||||
-rw-r--r-- | sys/src/cmd/5e/vfp.c | 2 |
3 files changed, 8 insertions, 10 deletions
diff --git a/sys/man/1/5e b/sys/man/1/5e index 45adbd629..9c9cb1793 100644 --- a/sys/man/1/5e +++ b/sys/man/1/5e @@ -4,7 +4,7 @@ .SH SYNOPSIS .B 5e [ -.B -npb +.B -npbF ] .I text [ @@ -92,6 +92,9 @@ causes failing processes to call instead of .I sysfatal. See below. +.TP +.B -F +Disable emulation of VFP floating point instructions. .SH SOURCE .B /sys/src/cmd/5e .SH SEE ALSO @@ -108,13 +111,6 @@ The emulator does not post notes. Obscure opcodes, in particular uncommon operations on R15, are not implemented. -Careless use of the -.B LDREX -and -.B STREX -instructions can lead to deadlock, while the -.I ARM Architecture Reference Manual -indicates a real processor will exhibit undefined behavior in these cases. Accesses spanning segment boundaries will be treated as page faults. Many syscalls such as diff --git a/sys/src/cmd/5e/5e.c b/sys/src/cmd/5e/5e.c index 238bcadaa..85367c3ee 100644 --- a/sys/src/cmd/5e/5e.c +++ b/sys/src/cmd/5e/5e.c @@ -4,6 +4,7 @@ #include "dat.h" #include "fns.h" +int vfp = 1; int nflag, pflag, bflag; Ref nproc; @@ -49,7 +50,7 @@ cleanup(void) static void usage(void) { - fprint(2, "usage: 5e [-npbf] text [...]\n"); + fprint(2, "usage: 5e [-npbF] text [...]\n"); exits(nil); } @@ -105,6 +106,7 @@ main(int argc, char **argv) case 'p': pflag++; break; case 'b': bflag++; break; case 'f': vfp = 1; break; + case 'F': vfp = 0; break; default: usage(); } ARGEND; if(argc < 1) diff --git a/sys/src/cmd/5e/vfp.c b/sys/src/cmd/5e/vfp.c index 2ab755a09..0f4e7eeb6 100644 --- a/sys/src/cmd/5e/vfp.c +++ b/sys/src/cmd/5e/vfp.c @@ -55,7 +55,7 @@ vfprmtransfer(u32int instr) sz = instr & (1<<8); if((instr & (1<<23)) == 0) off = -off; - ea = vaddr(evenaddr(P->R[n] + off, sz ? 7 : 3), 8, &seg); + ea = vaddr(evenaddr(P->R[n] + off, 3), sz ? 8 : 4, &seg); switch((instr>>20)&0x3){ case 0: if(sz) |