* [9fans] 5i floating point?
@ 2012-05-09 14:22 Comeau At9Fans
2012-05-09 14:36 ` cinap_lenrek
0 siblings, 1 reply; 15+ messages in thread
From: Comeau At9Fans @ 2012-05-09 14:22 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
[-- Attachment #1: Type: text/plain, Size: 533 bytes --]
>From 9vx.OSX if I compile this
#include <u.h>
#include <libc.h>
void main(void)
{
float f = 99.99;
exits(0);
}
with 5c/5l and then 5i it, it gives:
undefined instruction trap pc #102c inst ed9b0100 class 92
Is floating point supported with 5i?
--
Greg Comeau / 4.3.10.1 with C++0xisms now in beta!
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
[-- Attachment #2: Type: text/html, Size: 849 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [9fans] 5i floating point?
2012-05-09 14:22 [9fans] 5i floating point? Comeau At9Fans
@ 2012-05-09 14:36 ` cinap_lenrek
2012-05-09 14:47 ` Comeau At9Fans
2012-05-09 16:36 ` erik quanstrom
0 siblings, 2 replies; 15+ messages in thread
From: cinap_lenrek @ 2012-05-09 14:36 UTC (permalink / raw)
To: 9fans
aiju wrote an arm emulator for 9front some time ago and
i remember he implemented floating point on it.
might have a look there:
http://code.google.com/p/plan9front/source/browse/sys/src/cmd/5e
--
cinap
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [9fans] 5i floating point?
2012-05-09 14:36 ` cinap_lenrek
@ 2012-05-09 14:47 ` Comeau At9Fans
2012-05-09 15:11 ` David du Colombier
2012-05-09 16:36 ` erik quanstrom
1 sibling, 1 reply; 15+ messages in thread
From: Comeau At9Fans @ 2012-05-09 14:47 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
[-- Attachment #1: Type: text/plain, Size: 607 bytes --]
On Wed, May 9, 2012 at 10:36 AM, <cinap_lenrek@gmx.de> wrote:
> aiju wrote an arm emulator for 9front some time ago and
> i remember he implemented floating point on it.
>
> might have a look there:
>
> http://code.google.com/p/plan9front/source/browse/sys/src/cmd/5e
Thanks. What's the most sane way of downloading it to 9vx.OSX?
--
Greg Comeau / 4.3.10.1 with C++0xisms now in beta!
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
[-- Attachment #2: Type: text/html, Size: 1109 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [9fans] 5i floating point?
2012-05-09 14:47 ` Comeau At9Fans
@ 2012-05-09 15:11 ` David du Colombier
2012-05-09 15:24 ` Comeau At9Fans
0 siblings, 1 reply; 15+ messages in thread
From: David du Colombier @ 2012-05-09 15:11 UTC (permalink / raw)
To: 9fans
> > might have a look there:
> >
> > http://code.google.com/p/plan9front/source/browse/sys/src/cmd/5e
>
> Thanks. What's the most sane way of downloading it to 9vx.OSX?
mkdir /sys/src/cmd/5e
cd /sys/src/cmd/5e
for(i in 5e.c arm.c dat.h fns.h fpa.c fs.c mkfile proc.c seg.c sys.c util.c)
hget -o $i http://plan9front.googlecode.com/hg/sys/src/cmd/5e/$i
--
David du Colombier
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [9fans] 5i floating point?
2012-05-09 15:11 ` David du Colombier
@ 2012-05-09 15:24 ` Comeau At9Fans
2012-05-09 15:34 ` David du Colombier
0 siblings, 1 reply; 15+ messages in thread
From: Comeau At9Fans @ 2012-05-09 15:24 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
[-- Attachment #1: Type: text/plain, Size: 422 bytes --]
Ok, linking gives:
main: undefined: ainc in main
Looks to be a function (which also seems to be undeclared in 5e.c), anybody
know where it is located?
--
Greg Comeau / 4.3.10.1 with C++0xisms now in beta!
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
[-- Attachment #2: Type: text/html, Size: 602 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [9fans] 5i floating point?
2012-05-09 15:24 ` Comeau At9Fans
@ 2012-05-09 15:34 ` David du Colombier
2012-05-09 15:54 ` Comeau At9Fans
0 siblings, 1 reply; 15+ messages in thread
From: David du Colombier @ 2012-05-09 15:34 UTC (permalink / raw)
To: 9fans
> Ok, linking gives:
>
> main: undefined: ainc in main
>
> Looks to be a function (which also seems to be undeclared in 5e.c),
> anybody know where it is located?
It's defined in the libc. You can add it
to /sys/include/libc.h if you wish.
--
David du Colombier
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [9fans] 5i floating point?
2012-05-09 15:34 ` David du Colombier
@ 2012-05-09 15:54 ` Comeau At9Fans
2012-05-09 16:03 ` David du Colombier
0 siblings, 1 reply; 15+ messages in thread
From: Comeau At9Fans @ 2012-05-09 15:54 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
[-- Attachment #1: Type: text/plain, Size: 674 bytes --]
On Wed, May 9, 2012 at 11:34 AM, David du Colombier <0intro@gmail.com>wrote:
> > Ok, linking gives:
> >
> > main: undefined: ainc in main
> >
> > Looks to be a function (which also seems to be undeclared in 5e.c),
> > anybody know where it is located?
>
> It's defined in the libc. You can add it
> to /sys/include/libc.h if you wish.
If I nm /386/lib/libc.a | grep ainc
it returns nothing.
--
Greg Comeau / 4.3.10.1 with C++0xisms now in beta!
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
[-- Attachment #2: Type: text/html, Size: 1141 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [9fans] 5i floating point?
2012-05-09 15:54 ` Comeau At9Fans
@ 2012-05-09 16:03 ` David du Colombier
2012-05-09 18:06 ` Comeau At9Fans
0 siblings, 1 reply; 15+ messages in thread
From: David du Colombier @ 2012-05-09 16:03 UTC (permalink / raw)
To: 9fans
> If I nm /386/lib/libc.a | grep ainc
>
> it returns nothing.
Your libc is obviously not up-do-date.
term% nm /n/sources/plan9/386/lib/libc.a | grep ainc
atom.8: T ainc
See /n/sources/plan9/sys/src/libc/386/atom.s
--
David du Colombier
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [9fans] 5i floating point?
2012-05-09 16:03 ` David du Colombier
@ 2012-05-09 18:06 ` Comeau At9Fans
2012-05-10 12:24 ` Comeau At9Fans
0 siblings, 1 reply; 15+ messages in thread
From: Comeau At9Fans @ 2012-05-09 18:06 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
[-- Attachment #1: Type: text/plain, Size: 742 bytes --]
On Wed, May 9, 2012 at 12:03 PM, David du Colombier <0intro@gmail.com>wrote:
> > If I nm /386/lib/libc.a | grep ainc
> >
> > it returns nothing.
>
> Your libc is obviously not up-do-date.
>
> term% nm /n/sources/plan9/386/lib/libc.a | grep ainc
> atom.8: T ainc
>
> See /n/sources/plan9/sys/src/libc/386/atom.s
I have it built and it seems to be working, at least with APE built apps,
but I think it's not with non-APE due to something I'm doing. Thanks all.
--
Greg Comeau / 4.3.10.1 with C++0xisms now in beta!
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
[-- Attachment #2: Type: text/html, Size: 1203 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [9fans] 5i floating point?
2012-05-09 14:36 ` cinap_lenrek
2012-05-09 14:47 ` Comeau At9Fans
@ 2012-05-09 16:36 ` erik quanstrom
2012-05-09 17:18 ` Charles Forsyth
2012-05-14 3:34 ` Ethan Grammatikidis
1 sibling, 2 replies; 15+ messages in thread
From: erik quanstrom @ 2012-05-09 16:36 UTC (permalink / raw)
To: 9fans
On Wed May 9 10:38:21 EDT 2012, cinap_lenrek@gmx.de wrote:
> aiju wrote an arm emulator for 9front some time ago and
> i remember he implemented floating point on it.
>
> might have a look there:
>
> http://code.google.com/p/plan9front/source/browse/sys/src/cmd/5e
why was it done this way rather than extending 5i?
also, *which* floating point does it emulate. like intel,
there is a buffet of choices.
- erik
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [9fans] 5i floating point?
2012-05-09 16:36 ` erik quanstrom
@ 2012-05-09 17:18 ` Charles Forsyth
2012-05-14 3:34 ` Ethan Grammatikidis
1 sibling, 0 replies; 15+ messages in thread
From: Charles Forsyth @ 2012-05-09 17:18 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
[-- Attachment #1: Type: text/plain, Size: 141 bytes --]
the 7500's FPA.
On 9 May 2012 17:36, erik quanstrom <quanstro@labs.coraid.com> wrote:
> also, *which* floating point does it emulate.
[-- Attachment #2: Type: text/html, Size: 390 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [9fans] 5i floating point?
2012-05-09 16:36 ` erik quanstrom
2012-05-09 17:18 ` Charles Forsyth
@ 2012-05-14 3:34 ` Ethan Grammatikidis
2012-05-14 8:12 ` Charles Forsyth
1 sibling, 1 reply; 15+ messages in thread
From: Ethan Grammatikidis @ 2012-05-14 3:34 UTC (permalink / raw)
To: 9fans
On Wed, 9 May 2012 12:36:06 -0400
erik quanstrom <quanstro@labs.coraid.com> wrote:
> On Wed May 9 10:38:21 EDT 2012, cinap_lenrek@gmx.de wrote:
> > aiju wrote an arm emulator for 9front some time ago and
> > i remember he implemented floating point on it.
>
> why was it done this way rather than extending 5i?
my memory of the irc discussion over it is vague now, but i think 5e is
substantially different. patching 5i was considered, but i think it was
found wanting in more areas than just floating point.
^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <CAE9W7-hWmuF5_s6=q=JVg=Gs6E0WtUs-nVUT=MRAp6QASejR-g@mail.gmail.c>]
* Re: [9fans] 5i floating point?
[not found] <CAE9W7-hWmuF5_s6=q=JVg=Gs6E0WtUs-nVUT=MRAp6QASejR-g@mail.gmail.c>
@ 2012-05-09 14:30 ` erik quanstrom
0 siblings, 0 replies; 15+ messages in thread
From: erik quanstrom @ 2012-05-09 14:30 UTC (permalink / raw)
To: 9fans
yes. the instructions are not implemented. unfortunately abort()
was called without flushing the output, so the error message wasn't
printed.
; diffy -c /sys/src/cmd/5i/run.c
/n/dump/2012/0509/sys/src/cmd/5i/run.c:260,265 - /sys/src/cmd/5i/run.c:260,266
{
Bprint(bioout, "undefined instruction trap pc #%lux inst %.8lux class %d\n",
reg.r[REGPC], inst, reg.class);
+ Bflush(bioout);
abort();
longjmp(errjmp, 0);
}
; 5i 5.armfloat
5i
:r
undefined instruction trap pc #102c inst ed9b0100 class 92
5i 12535: suicide: sys: trap: fault read addr=0x0 pc=0xb2c5
- erik
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2012-05-14 8:12 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-09 14:22 [9fans] 5i floating point? Comeau At9Fans
2012-05-09 14:36 ` cinap_lenrek
2012-05-09 14:47 ` Comeau At9Fans
2012-05-09 15:11 ` David du Colombier
2012-05-09 15:24 ` Comeau At9Fans
2012-05-09 15:34 ` David du Colombier
2012-05-09 15:54 ` Comeau At9Fans
2012-05-09 16:03 ` David du Colombier
2012-05-09 18:06 ` Comeau At9Fans
2012-05-10 12:24 ` Comeau At9Fans
2012-05-09 16:36 ` erik quanstrom
2012-05-09 17:18 ` Charles Forsyth
2012-05-14 3:34 ` Ethan Grammatikidis
2012-05-14 8:12 ` Charles Forsyth
[not found] <CAE9W7-hWmuF5_s6=q=JVg=Gs6E0WtUs-nVUT=MRAp6QASejR-g@mail.gmail.c>
2012-05-09 14:30 ` erik quanstrom
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).