* Re: r3000 instruction set
@ 2004-02-23 20:48 Mark and Janice Juszczec
2004-02-23 22:46 ` Kevin D. Kissell
0 siblings, 1 reply; 25+ messages in thread
From: Mark and Janice Juszczec @ 2004-02-23 20:48 UTC (permalink / raw)
To: kevink, linux-mips; +Cc: uhler, dom, echristo
Kevin
Its been a few weeks since I built this version of kaffe. The configure
output says I did specify --with-engine=intrp. I'll delete the compiled
stuff, reconfigure (double checking that I give it --with-engine=intrp),
recompile and retest.
I'll post my results.
Mark
>From: "Kevin D. Kissell" <kevink@mips.com>
>To: "Mark and Janice Juszczec" <juszczec@hotmail.com>,
><linux-mips@linux-mips.org>
>CC: <uhler@mips.com>, <dom@mips.com>, <echristo@redhat.com>
>Subject: Re: r3000 instruction set
>Date: Mon, 23 Feb 2004 18:21:19 +0100
>
> > Someone suggested posting the message I get. Here it is:
> >
> > >./kaffe-bin FirstClass
> > [kaffe-bin:6] Illgal instruction 674696a at 2abb034, ra=2adbffd0,
> > P0_STATUS=0000500
> > pid 6: killed (signal 4)
> > >Reading command line: Try again
> > Kernel panic: Attmpted to kill int!
>
>Let me guess. You are running little-endian. The instruction word
>in memory would be 0x6a697406. Do you think it's a coincidence
>that 0x6a6974 spells "jit" in ASCII? ;o)
>
>The reported address range looks like that where kaffe builds its
>JITted instruciton buffers in MIPS/Linux. And, like I say, JIT is
>somewhat broken for MIPS in Kaffe. Which version of the kaffe sources
>are you building, and have you tried configuring with --with-engine=intrp
>as I suggested?
>
> Regards,
>
> Kevin K.
_________________________________________________________________
Click, drag and drop. My MSN is the simple way to design your homepage.
http://click.atdmt.com/AVE/go/onm00200364ave/direct/01/
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: r3000 instruction set
@ 2004-02-23 22:46 ` Kevin D. Kissell
0 siblings, 0 replies; 25+ messages in thread
From: Kevin D. Kissell @ 2004-02-23 22:46 UTC (permalink / raw)
To: Mark and Janice Juszczec, linux-mips; +Cc: uhler, dom, echristo
Kaffe's makefiles won't pick up on configuration changes, so any time
you re-configure for a different engine or debug level, you need to do
a make clean. At least, that's the way it was the last time I worked on it.
If you had a partial build with JIT, then changed to intrp, then you could
get all kinds of strange behavior. The address range of your error us a
dead giveaway. It's too high to be the kaffe code segment, but too low
to be a shared library. It's where I'd expect the heap to be, and where
I remember the JIT buffers being allocated when I was trying to debug
that stuff.
> Its been a few weeks since I built this version of kaffe. The configure
> output says I did specify --with-engine=intrp. I'll delete the compiled
> stuff, reconfigure (double checking that I give it --with-engine=intrp),
> recompile and retest.
>
> I'll post my results.
>
> Mark
>
>
>
> >From: "Kevin D. Kissell" <kevink@mips.com>
> >To: "Mark and Janice Juszczec" <juszczec@hotmail.com>,
> ><linux-mips@linux-mips.org>
> >CC: <uhler@mips.com>, <dom@mips.com>, <echristo@redhat.com>
> >Subject: Re: r3000 instruction set
> >Date: Mon, 23 Feb 2004 18:21:19 +0100
> >
> > > Someone suggested posting the message I get. Here it is:
> > >
> > > >./kaffe-bin FirstClass
> > > [kaffe-bin:6] Illgal instruction 674696a at 2abb034, ra=2adbffd0,
> > > P0_STATUS=0000500
> > > pid 6: killed (signal 4)
> > > >Reading command line: Try again
> > > Kernel panic: Attmpted to kill int!
> >
> >Let me guess. You are running little-endian. The instruction word
> >in memory would be 0x6a697406. Do you think it's a coincidence
> >that 0x6a6974 spells "jit" in ASCII? ;o)
> >
> >The reported address range looks like that where kaffe builds its
> >JITted instruciton buffers in MIPS/Linux. And, like I say, JIT is
> >somewhat broken for MIPS in Kaffe. Which version of the kaffe sources
> >are you building, and have you tried configuring with --with-engine=intrp
> >as I suggested?
> >
> > Regards,
> >
> > Kevin K.
>
> _________________________________________________________________
> Click, drag and drop. My MSN is the simple way to design your homepage.
> http://click.atdmt.com/AVE/go/onm00200364ave/direct/01/
>
>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: r3000 instruction set
@ 2004-02-23 22:46 ` Kevin D. Kissell
0 siblings, 0 replies; 25+ messages in thread
From: Kevin D. Kissell @ 2004-02-23 22:46 UTC (permalink / raw)
To: Mark and Janice Juszczec, linux-mips; +Cc: uhler, dom, echristo
Kaffe's makefiles won't pick up on configuration changes, so any time
you re-configure for a different engine or debug level, you need to do
a make clean. At least, that's the way it was the last time I worked on it.
If you had a partial build with JIT, then changed to intrp, then you could
get all kinds of strange behavior. The address range of your error us a
dead giveaway. It's too high to be the kaffe code segment, but too low
to be a shared library. It's where I'd expect the heap to be, and where
I remember the JIT buffers being allocated when I was trying to debug
that stuff.
> Its been a few weeks since I built this version of kaffe. The configure
> output says I did specify --with-engine=intrp. I'll delete the compiled
> stuff, reconfigure (double checking that I give it --with-engine=intrp),
> recompile and retest.
>
> I'll post my results.
>
> Mark
>
>
>
> >From: "Kevin D. Kissell" <kevink@mips.com>
> >To: "Mark and Janice Juszczec" <juszczec@hotmail.com>,
> ><linux-mips@linux-mips.org>
> >CC: <uhler@mips.com>, <dom@mips.com>, <echristo@redhat.com>
> >Subject: Re: r3000 instruction set
> >Date: Mon, 23 Feb 2004 18:21:19 +0100
> >
> > > Someone suggested posting the message I get. Here it is:
> > >
> > > >./kaffe-bin FirstClass
> > > [kaffe-bin:6] Illgal instruction 674696a at 2abb034, ra=2adbffd0,
> > > P0_STATUS=0000500
> > > pid 6: killed (signal 4)
> > > >Reading command line: Try again
> > > Kernel panic: Attmpted to kill int!
> >
> >Let me guess. You are running little-endian. The instruction word
> >in memory would be 0x6a697406. Do you think it's a coincidence
> >that 0x6a6974 spells "jit" in ASCII? ;o)
> >
> >The reported address range looks like that where kaffe builds its
> >JITted instruciton buffers in MIPS/Linux. And, like I say, JIT is
> >somewhat broken for MIPS in Kaffe. Which version of the kaffe sources
> >are you building, and have you tried configuring with --with-engine=intrp
> >as I suggested?
> >
> > Regards,
> >
> > Kevin K.
>
> _________________________________________________________________
> Click, drag and drop. My MSN is the simple way to design your homepage.
> http://click.atdmt.com/AVE/go/onm00200364ave/direct/01/
>
>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: r3000 instruction set
@ 2004-03-01 15:38 Mark and Janice Juszczec
0 siblings, 0 replies; 25+ messages in thread
From: Mark and Janice Juszczec @ 2004-03-01 15:38 UTC (permalink / raw)
To: kevink, linux-mips; +Cc: uhler, dom, echristo
Hi folks
Thanks for all the information guys. Sorry I didn't reply sooner. I got
buried at work with production problems but I've finally dug myself out from
under.
It must have been a bad kaffe build. I deleted everything, reconfigured,
made sure I specified --with-engine=intrp and rebuilt.
Now, I'm getting signal 10. I may need to set my stack and heap size
smaller. kaffe's default sizes are bigger than all the memory in my pda.
I'll let y'all know what turns up.
Mark
>From: "Kevin D. Kissell" <kevink@mips.com>
>To: "Mark and Janice Juszczec" <juszczec@hotmail.com>,
><linux-mips@linux-mips.org>
>CC: <uhler@mips.com>, <dom@mips.com>, <echristo@redhat.com>
>Subject: Re: r3000 instruction set
>Date: Mon, 23 Feb 2004 18:21:19 +0100
>
> > Someone suggested posting the message I get. Here it is:
> >
> > >./kaffe-bin FirstClass
> > [kaffe-bin:6] Illgal instruction 674696a at 2abb034, ra=2adbffd0,
> > P0_STATUS=0000500
> > pid 6: killed (signal 4)
> > >Reading command line: Try again
> > Kernel panic: Attmpted to kill int!
>
>Let me guess. You are running little-endian. The instruction word
>in memory would be 0x6a697406. Do you think it's a coincidence
>that 0x6a6974 spells "jit" in ASCII? ;o)
>
>The reported address range looks like that where kaffe builds its
>JITted instruciton buffers in MIPS/Linux. And, like I say, JIT is
>somewhat broken for MIPS in Kaffe. Which version of the kaffe sources
>are you building, and have you tried configuring with --with-engine=intrp
>as I suggested?
>
> Regards,
>
> Kevin K.
_________________________________________________________________
Click, drag and drop. My MSN is the simple way to design your homepage.
http://click.atdmt.com/AVE/go/onm00200364ave/direct/01/
^ permalink raw reply [flat|nested] 25+ messages in thread
* RE: r3000 instruction set
@ 2004-02-23 16:56 Mark and Janice Juszczec
2004-02-23 17:07 ` Michael Uhler
` (3 more replies)
0 siblings, 4 replies; 25+ messages in thread
From: Mark and Janice Juszczec @ 2004-02-23 16:56 UTC (permalink / raw)
To: linux-mips; +Cc: uhler, kevink, dom, echristo
Hello folks
Thanks for all the information. Its all been very useful.
Someone suggested posting the message I get. Here it is:
>./kaffe-bin FirstClass
[kaffe-bin:6] Illgal instruction 674696a at 2abb034, ra=2adbffd0,
P0_STATUS=0000500
pid 6: killed (signal 4)
>Reading command line: Try again
Kernel panic: Attmpted to kill int!
Someone else suggested dumping all the assembler instructions. The listing
is really long, so I made a unique list of the commands themselves. If
someone can tell me how to use the above error message to figure out the
command causing the problem, I'd really appreciate it. If that's
impossible, can someone tell me which command listed below does not belong?
/opt/crosstool/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/bin/mipsel-unknown-linux-gnu-objdump
-d kaffe-bin | awk '{print $3}' | sort -u
addiu
addu
b
beq
beqz
blez
bne
bnez
jalr
jr
lb
lbu
li
lui
lw
move
nop
ori
sb
sll
slt
sltiu
subu
sw
Finally, can someone tell me where I can get a copy of "See MIPS Run"
Thanks again for all the help
Mark
_________________________________________________________________
Say good-bye to spam, viruses and pop-ups with MSN Premium -- free trial
offer! http://click.atdmt.com/AVE/go/onm00200359ave/direct/01/
^ permalink raw reply [flat|nested] 25+ messages in thread* RE: r3000 instruction set
2004-02-23 16:56 Mark and Janice Juszczec
@ 2004-02-23 17:07 ` Michael Uhler
2004-02-23 17:13 ` Maciej W. Rozycki
` (2 subsequent siblings)
3 siblings, 0 replies; 25+ messages in thread
From: Michael Uhler @ 2004-02-23 17:07 UTC (permalink / raw)
To: Mark and Janice Juszczec; +Cc: linux-mips, kevink, dom, echristo
On Mon, 2004-02-23 at 08:56, Mark and Janice Juszczec wrote:
> Hello folks
>
> Thanks for all the information. Its all been very useful.
>
> Someone suggested posting the message I get. Here it is:
>
> >./kaffe-bin FirstClass
> [kaffe-bin:6] Illgal instruction 674696a at 2abb034, ra=2adbffd0,
> P0_STATUS=0000500
> pid 6: killed (signal 4)
> >Reading command line: Try again
> Kernel panic: Attmpted to kill int!
Under the assumption that I'm reading the message right and the
instruction is 0x674696a, that is absolutely a reserved instruction
(it is decoded as a RegImm format instruction with an illegal
rt field. So unless the 3912 implements something at that code
point, it's really illegal. I'd check the code generation to
see why it's generating that encoding.
>
> Someone else suggested dumping all the assembler instructions. The listing
> is really long, so I made a unique list of the commands themselves. If
> someone can tell me how to use the above error message to figure out the
> command causing the problem, I'd really appreciate it. If that's
> impossible, can someone tell me which command listed below does not belong?
>
> /opt/crosstool/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/bin/mipsel-unknown-linux-gnu-objdump
> -d kaffe-bin | awk '{print $3}' | sort -u
>
> addiu
> addu
> b
> beq
> beqz
> blez
> bne
> bnez
> jalr
> jr
> lb
> lbu
> li
> lui
> lw
> move
> nop
> ori
> sb
> sll
> slt
> sltiu
> subu
> sw
>
> Finally, can someone tell me where I can get a copy of "See MIPS Run"
Amazon.com should have it.
>
> Thanks again for all the help
>
> Mark
>
> _________________________________________________________________
> Say good-bye to spam, viruses and pop-ups with MSN Premium -- free trial
> offer! http://click.atdmt.com/AVE/go/onm00200359ave/direct/01/
--
Michael Uhler, Chief Technology Officer
MIPS Technologies, Inc. Email: uhler@mips.com Pager:uhler_p@mips.com
1225 Charleston Road Voice: (650)567-5025 FAX: (650)567-5225
Mountain View, CA 94043 Mobile: (650)868-6870 Admin: (650)567-5085
^ permalink raw reply [flat|nested] 25+ messages in thread* RE: r3000 instruction set
2004-02-23 16:56 Mark and Janice Juszczec
2004-02-23 17:07 ` Michael Uhler
@ 2004-02-23 17:13 ` Maciej W. Rozycki
2004-02-23 17:21 ` Kevin D. Kissell
2004-02-23 17:59 ` Dominic Sweetman
3 siblings, 0 replies; 25+ messages in thread
From: Maciej W. Rozycki @ 2004-02-23 17:13 UTC (permalink / raw)
To: Mark and Janice Juszczec; +Cc: linux-mips, uhler, kevink, dom, echristo
On Mon, 23 Feb 2004, Mark and Janice Juszczec wrote:
> Someone suggested posting the message I get. Here it is:
>
> >./kaffe-bin FirstClass
> [kaffe-bin:6] Illgal instruction 674696a at 2abb034, ra=2adbffd0,
> P0_STATUS=0000500
> pid 6: killed (signal 4)
> >Reading command line: Try again
> Kernel panic: Attmpted to kill int!
>
> Someone else suggested dumping all the assembler instructions. The listing
> is really long, so I made a unique list of the commands themselves. If
> someone can tell me how to use the above error message to figure out the
> command causing the problem, I'd really appreciate it. If that's
The causing instructions is 674696a -- depending on the endianness, it's
either:
6a697406 ldl t1,29702(s3)
which requires at least MIPS III or:
0674696a 0x674696a
which is completely invalid.
There are a few ways to track the reason down:
1. Figure out which binary or shared library 0x2abb034 belongs to and
disassemble the surrounding code.
2. Enable core dumps, run the failing program and do a post-mortem
analysis of the resulting dump with gdb.
3. Run the failing program under gdb and see where SIGILL happens.
4. Perhaps others.
> impossible, can someone tell me which command listed below does not belong?
>
> /opt/crosstool/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/bin/mipsel-unknown-linux-gnu-objdump
> -d kaffe-bin | awk '{print $3}' | sort -u
You really want "-S" instead of "-d" (there's usually no point to
disassemble data) and add "-m mips:isa64" or a similar, suitably high ISA
selector (depending on binutils version), so that you get a disassembly of
all instructions as opposed to those defined by the MIPS I ISA only.
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
^ permalink raw reply [flat|nested] 25+ messages in thread* Re: r3000 instruction set
@ 2004-02-23 17:21 ` Kevin D. Kissell
0 siblings, 0 replies; 25+ messages in thread
From: Kevin D. Kissell @ 2004-02-23 17:21 UTC (permalink / raw)
To: Mark and Janice Juszczec, linux-mips; +Cc: uhler, dom, echristo
> Someone suggested posting the message I get. Here it is:
>
> >./kaffe-bin FirstClass
> [kaffe-bin:6] Illgal instruction 674696a at 2abb034, ra=2adbffd0,
> P0_STATUS=0000500
> pid 6: killed (signal 4)
> >Reading command line: Try again
> Kernel panic: Attmpted to kill int!
Let me guess. You are running little-endian. The instruction word
in memory would be 0x6a697406. Do you think it's a coincidence
that 0x6a6974 spells "jit" in ASCII? ;o)
The reported address range looks like that where kaffe builds its
JITted instruciton buffers in MIPS/Linux. And, like I say, JIT is
somewhat broken for MIPS in Kaffe. Which version of the kaffe sources
are you building, and have you tried configuring with --with-engine=intrp
as I suggested?
Regards,
Kevin K.
^ permalink raw reply [flat|nested] 25+ messages in thread* Re: r3000 instruction set
@ 2004-02-23 17:21 ` Kevin D. Kissell
0 siblings, 0 replies; 25+ messages in thread
From: Kevin D. Kissell @ 2004-02-23 17:21 UTC (permalink / raw)
To: Mark and Janice Juszczec, linux-mips; +Cc: uhler, dom, echristo
> Someone suggested posting the message I get. Here it is:
>
> >./kaffe-bin FirstClass
> [kaffe-bin:6] Illgal instruction 674696a at 2abb034, ra=2adbffd0,
> P0_STATUS=0000500
> pid 6: killed (signal 4)
> >Reading command line: Try again
> Kernel panic: Attmpted to kill int!
Let me guess. You are running little-endian. The instruction word
in memory would be 0x6a697406. Do you think it's a coincidence
that 0x6a6974 spells "jit" in ASCII? ;o)
The reported address range looks like that where kaffe builds its
JITted instruciton buffers in MIPS/Linux. And, like I say, JIT is
somewhat broken for MIPS in Kaffe. Which version of the kaffe sources
are you building, and have you tried configuring with --with-engine=intrp
as I suggested?
Regards,
Kevin K.
^ permalink raw reply [flat|nested] 25+ messages in thread
* RE: r3000 instruction set
2004-02-23 16:56 Mark and Janice Juszczec
` (2 preceding siblings ...)
2004-02-23 17:21 ` Kevin D. Kissell
@ 2004-02-23 17:59 ` Dominic Sweetman
3 siblings, 0 replies; 25+ messages in thread
From: Dominic Sweetman @ 2004-02-23 17:59 UTC (permalink / raw)
To: Mark and Janice Juszczec; +Cc: linux-mips, uhler, kevink, dom, echristo
Mark and Janice,
I think Kevin got it right. "jit"... don't you love it.
> Finally, can someone tell me where I can get a copy of "See MIPS Run"
amazon.com say "ships within 24 hours". But your physical location is
a mystery to me, and if you're penguin hackers from Antarctica, that
probably won't help...
--
Dominic Sweetman
MIPS Technologies
^ permalink raw reply [flat|nested] 25+ messages in thread
* r3000 instruction set
@ 2004-02-22 3:02 Mark and Janice Juszczec
2004-02-22 3:15 ` Michael Uhler
` (3 more replies)
0 siblings, 4 replies; 25+ messages in thread
From: Mark and Janice Juszczec @ 2004-02-22 3:02 UTC (permalink / raw)
To: linux-mips
Hi folks
I'm working with kaffe on a r3912 cpu. I'm getting an illegal instruction
error. I disassembled the kaffe binary and thought I'd find the offending
instruction.
Unfortunately, I found 2 different lists of r3000 assembler instructions at:
http://www.xs4all.nl/~vhouten/mipsel/r3000-isa.html
http://www.xs4all.nl/~vhouten/mipsel/appB.html
and comparing them against the list of disassembled kaffe instructions
gives 2 different results.
So, can someone recommend a definitive list of r3000 assembler instructions?
Any help would be greatly appreciated.
Mark
_________________________________________________________________
Find and compare great deals on Broadband access at the MSN High-Speed
Marketplace. http://click.atdmt.com/AVE/go/onm00200360ave/direct/01/
^ permalink raw reply [flat|nested] 25+ messages in thread* Re: r3000 instruction set
2004-02-22 3:02 Mark and Janice Juszczec
@ 2004-02-22 3:15 ` Michael Uhler
2004-02-22 9:32 ` Kevin D. Kissell
` (2 subsequent siblings)
3 siblings, 0 replies; 25+ messages in thread
From: Michael Uhler @ 2004-02-22 3:15 UTC (permalink / raw)
To: Mark and Janice Juszczec; +Cc: linux-mips
Unfortunately, what you want isn't the r3000 instruction list but,
instead the 3912 instruction list. While the original r3000
instructions were well-defined, each manufacturer tended to
add or subtract certain instructions in each implementation
(creating the kind of behavior and questions that you're seeing).
So rather than asking for the list, why not just post the disassembly
and the pc of the reserved instruction?
/gmu
On Sat, 2004-02-21 at 19:02, Mark and Janice Juszczec wrote:
> Hi folks
>
> I'm working with kaffe on a r3912 cpu. I'm getting an illegal instruction
> error. I disassembled the kaffe binary and thought I'd find the offending
> instruction.
>
> Unfortunately, I found 2 different lists of r3000 assembler instructions at:
>
> http://www.xs4all.nl/~vhouten/mipsel/r3000-isa.html
> http://www.xs4all.nl/~vhouten/mipsel/appB.html
>
> and comparing them against the list of disassembled kaffe instructions
> gives 2 different results.
>
> So, can someone recommend a definitive list of r3000 assembler instructions?
>
> Any help would be greatly appreciated.
>
> Mark
>
> _________________________________________________________________
> Find and compare great deals on Broadband access at the MSN High-Speed
> Marketplace. http://click.atdmt.com/AVE/go/onm00200360ave/direct/01/
>
>
--
Michael Uhler, Chief Technology Officer
MIPS Technologies, Inc. Email: uhler@mips.com
1225 Charleston Road Voice: (650)567-5025 FAX: (650)567-5225
Mountain View, CA 94043 Mobile: (650)868-6870 Admin: (650)567-5085
^ permalink raw reply [flat|nested] 25+ messages in thread* Re: r3000 instruction set
@ 2004-02-22 9:32 ` Kevin D. Kissell
0 siblings, 0 replies; 25+ messages in thread
From: Kevin D. Kissell @ 2004-02-22 9:32 UTC (permalink / raw)
To: Mark and Janice Juszczec, linux-mips
> I'm working with kaffe on a r3912 cpu. I'm getting an illegal instruction
> error. I disassembled the kaffe binary and thought I'd find the offending
> instruction.
>
> Unfortunately, I found 2 different lists of r3000 assembler instructions at:
>
> http://www.xs4all.nl/~vhouten/mipsel/r3000-isa.html
> http://www.xs4all.nl/~vhouten/mipsel/appB.html
>
> and comparing them against the list of disassembled kaffe instructions
> gives 2 different results.
>
> So, can someone recommend a definitive list of r3000 assembler instructions?
Several things here. First,. as Mike pointed out, the 3912 is not an R3000.
It's a superset of the original R3000 "MIPS I" instruction set. Interestingly,
while the "Appendix B" web page you cite above describes itself as listing
the MIPS I instruction, it actually lists some of the MIPS II instructions that
are implemented in the R3912.
There do seem to be some errors on the first page you cite. For example,
it calls out a "subtract unsigned" instruction, which exists, but then gives it
a non-existent opcode (subi), and incorrect semantics ("exception possible").
So I would ignore that page. You can get an accurate description of the
MIPS32 instruction set from the MIPS Technologies Inc. web pages at
http://www.mips.com/content/Documentation/MIPSDocumentation/ProcessorArchitecture/doclibrary
though you do need to register to get access. MIPS32 is a superset of MIPS I,
but it's a strict superset, so any instructions you see in your R3912 trace
should be documented in the MIPS32 spec, with the exeptions of RFE,
which was obsoleted by ERET in MIPS III, and the R3912 MADD/MADDU
instructions, which were superset extensions which predated the MIPS32 MADD
instructions, and which collide with the MIPS32 CLZ instruction decode.
I spend some time working on Kaffe for MIPS a couple of years ago,
and I remember that there were some hooks to try to manage the ISA
level used. For example, I had to fix some stuff around the use of the
MIPS IV/MIPS32 conditional move instructions where aren't available
in older cores like the R3912 - but I fixed that because I saw that it was
broken, not because I was testing on a true MIPS I/II platform. So
someone could have screwed up something else somewhere along those lines.
Note also that the JIT3 logic has always been slightly broken for MIPS.
I spent a week or two trying to hunt it down, disassembling the generated
code buffers, and all the errors I saw *seemed* to be due to the generated
code assuming that some data structure was initialized with a pointer value
that in fact was zero. That may not be what you're seeing, but since everyone
who actually uses Kaffe for MIPS configures it with --set-engine=intrp,
instructions could be generated by the JIT3 code which are not compatible
with older MIPS designs, and people might not have noticed.
Regards,
Kevin K.
^ permalink raw reply [flat|nested] 25+ messages in thread* Re: r3000 instruction set
@ 2004-02-22 9:32 ` Kevin D. Kissell
0 siblings, 0 replies; 25+ messages in thread
From: Kevin D. Kissell @ 2004-02-22 9:32 UTC (permalink / raw)
To: Mark and Janice Juszczec, linux-mips
> I'm working with kaffe on a r3912 cpu. I'm getting an illegal instruction
> error. I disassembled the kaffe binary and thought I'd find the offending
> instruction.
>
> Unfortunately, I found 2 different lists of r3000 assembler instructions at:
>
> http://www.xs4all.nl/~vhouten/mipsel/r3000-isa.html
> http://www.xs4all.nl/~vhouten/mipsel/appB.html
>
> and comparing them against the list of disassembled kaffe instructions
> gives 2 different results.
>
> So, can someone recommend a definitive list of r3000 assembler instructions?
Several things here. First,. as Mike pointed out, the 3912 is not an R3000.
It's a superset of the original R3000 "MIPS I" instruction set. Interestingly,
while the "Appendix B" web page you cite above describes itself as listing
the MIPS I instruction, it actually lists some of the MIPS II instructions that
are implemented in the R3912.
There do seem to be some errors on the first page you cite. For example,
it calls out a "subtract unsigned" instruction, which exists, but then gives it
a non-existent opcode (subi), and incorrect semantics ("exception possible").
So I would ignore that page. You can get an accurate description of the
MIPS32 instruction set from the MIPS Technologies Inc. web pages at
http://www.mips.com/content/Documentation/MIPSDocumentation/ProcessorArchitecture/doclibrary
though you do need to register to get access. MIPS32 is a superset of MIPS I,
but it's a strict superset, so any instructions you see in your R3912 trace
should be documented in the MIPS32 spec, with the exeptions of RFE,
which was obsoleted by ERET in MIPS III, and the R3912 MADD/MADDU
instructions, which were superset extensions which predated the MIPS32 MADD
instructions, and which collide with the MIPS32 CLZ instruction decode.
I spend some time working on Kaffe for MIPS a couple of years ago,
and I remember that there were some hooks to try to manage the ISA
level used. For example, I had to fix some stuff around the use of the
MIPS IV/MIPS32 conditional move instructions where aren't available
in older cores like the R3912 - but I fixed that because I saw that it was
broken, not because I was testing on a true MIPS I/II platform. So
someone could have screwed up something else somewhere along those lines.
Note also that the JIT3 logic has always been slightly broken for MIPS.
I spent a week or two trying to hunt it down, disassembling the generated
code buffers, and all the errors I saw *seemed* to be due to the generated
code assuming that some data structure was initialized with a pointer value
that in fact was zero. That may not be what you're seeing, but since everyone
who actually uses Kaffe for MIPS configures it with --set-engine=intrp,
instructions could be generated by the JIT3 code which are not compatible
with older MIPS designs, and people might not have noticed.
Regards,
Kevin K.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: r3000 instruction set
2004-02-22 3:02 Mark and Janice Juszczec
2004-02-22 3:15 ` Michael Uhler
2004-02-22 9:32 ` Kevin D. Kissell
@ 2004-02-22 12:31 ` Dominic Sweetman
2004-02-22 19:13 ` Eric Christopher
3 siblings, 0 replies; 25+ messages in thread
From: Dominic Sweetman @ 2004-02-22 12:31 UTC (permalink / raw)
To: Mark and Janice Juszczec; +Cc: linux-mips
Mark and Janice Juszczec (juszczec@hotmail.com) writes:
> I'm working with kaffe on a r3912 cpu. I'm getting an illegal instruction
> error. I disassembled the kaffe binary and thought I'd find the offending
> instruction.
Two suggestions, to make a hat-trick of responses from MIPS. "See
MIPS Run" (I'm too modest to mention the author's name) has a pretty
accurate list of instructions covering R3000 and 39xx derivatives.
Any reasonable GNU assembler knows all the instructions there ever
were - and if you look at the table in mips-opc.c, fairly accurately
attributed to various instruction set definitions and extensions.
--
Dominic Sweetman
MIPS Technologies.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: r3000 instruction set
2004-02-22 3:02 Mark and Janice Juszczec
` (2 preceding siblings ...)
2004-02-22 12:31 ` Dominic Sweetman
@ 2004-02-22 19:13 ` Eric Christopher
2004-02-22 21:52 ` Kevin D. Kissell
3 siblings, 1 reply; 25+ messages in thread
From: Eric Christopher @ 2004-02-22 19:13 UTC (permalink / raw)
To: Mark and Janice Juszczec; +Cc: linux-mips
> So, can someone recommend a definitive list of r3000 assembler instructions?
Other than the responses you've already gotten, likely you'll need to
compile with -march=r3900(or -mcpu=r3900 if it's an old toolchain) since
the 3900 is missing a couple of r3000 instructions iirc.
If it's the 3912 I remember it also doesn't have an fpu, but I could be
wrong there. If it is, then you need -msoft-float as well.
-eric
--
Eric Christopher <echristo@redhat.com>
^ permalink raw reply [flat|nested] 25+ messages in thread* Re: r3000 instruction set
@ 2004-02-22 21:52 ` Kevin D. Kissell
0 siblings, 0 replies; 25+ messages in thread
From: Kevin D. Kissell @ 2004-02-22 21:52 UTC (permalink / raw)
To: Eric Christopher, Mark and Janice Juszczec; +Cc: linux-mips
> Other than the responses you've already gotten, likely you'll need to
> compile with -march=r3900(or -mcpu=r3900 if it's an old toolchain) since
> the 3900 is missing a couple of r3000 instructions iirc.
The 3900 family should run MIPS I code compiled for the R3000.
> If it's the 3912 I remember it also doesn't have an fpu, but I could be
> wrong there. If it is, then you need -msoft-float as well.
The 3912 has no FPU, but if you're running on any contemporary
MIPS/Linux kernel and library system, you neither need nor want
soft-float. The kernel does FP instruction emulation. Running soft-float
would make for faster, if larger, code, but requires that the whole
system, particularly glibc, be built for soft-float, which is rarely done
(and the last time I tried it, didin't quite work with the standard
glibc sources out-of-the-box).
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: r3000 instruction set
@ 2004-02-22 21:52 ` Kevin D. Kissell
0 siblings, 0 replies; 25+ messages in thread
From: Kevin D. Kissell @ 2004-02-22 21:52 UTC (permalink / raw)
To: Eric Christopher, Mark and Janice Juszczec; +Cc: linux-mips
> Other than the responses you've already gotten, likely you'll need to
> compile with -march=r3900(or -mcpu=r3900 if it's an old toolchain) since
> the 3900 is missing a couple of r3000 instructions iirc.
The 3900 family should run MIPS I code compiled for the R3000.
> If it's the 3912 I remember it also doesn't have an fpu, but I could be
> wrong there. If it is, then you need -msoft-float as well.
The 3912 has no FPU, but if you're running on any contemporary
MIPS/Linux kernel and library system, you neither need nor want
soft-float. The kernel does FP instruction emulation. Running soft-float
would make for faster, if larger, code, but requires that the whole
system, particularly glibc, be built for soft-float, which is rarely done
(and the last time I tried it, didin't quite work with the standard
glibc sources out-of-the-box).
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: r3000 instruction set
2004-02-22 21:52 ` Kevin D. Kissell
(?)
@ 2004-02-23 3:03 ` Steven J. Hill
2004-02-23 7:03 ` Kevin D. Kissell
-1 siblings, 1 reply; 25+ messages in thread
From: Steven J. Hill @ 2004-02-23 3:03 UTC (permalink / raw)
To: Kevin D. Kissell; +Cc: Eric Christopher, Mark and Janice Juszczec, linux-mips
Kevin D. Kissell wrote:
>
> The 3900 family should run MIPS I code compiled for the R3000.
>
Yep.
> The 3912 has no FPU, but if you're running on any contemporary
> MIPS/Linux kernel and library system, you neither need nor want
> soft-float. The kernel does FP instruction emulation. Running soft-float
> would make for faster, if larger, code, but requires that the whole
> system, particularly glibc, be built for soft-float, which is rarely done
> (and the last time I tried it, didin't quite work with the standard
> glibc sources out-of-the-box).
>
Correct. I use the FP emulator in Linux for my TX3917/PR31700 stuff. I
have had no problems. Current glibc has assembly code that assumes hardware
floating point which is why building for soft-float does not work out of
the box. There are probably some patches out there to rectify that. My
personal choice, use uClibc (http://uclibc.org/) for your C runtime. I wrote
the dynamic linker loader for MIPS and would highly recommend you try it out.
I would really like to see more testing of it.
Also, I have some documents for the 3912 on my FTP site:
ftp://ftp.realitydiluted.com/docs/Toshiba
ftp://ftp.realitydiluted.com/docs/Philips
It should be noted that the Toshiba TX3912 and the Philips PR31700 are
identical cores. There was definitely some cross-licensing going on there.
Perhaps Kevin or Dominic would know this in more detail, but it is not
really that important.
-Steve
^ permalink raw reply [flat|nested] 25+ messages in thread* Re: r3000 instruction set
@ 2004-02-23 7:03 ` Kevin D. Kissell
0 siblings, 0 replies; 25+ messages in thread
From: Kevin D. Kissell @ 2004-02-23 7:03 UTC (permalink / raw)
To: Steven J. Hill; +Cc: Eric Christopher, Mark and Janice Juszczec, linux-mips
> > The 3912 has no FPU, but if you're running on any contemporary
> > MIPS/Linux kernel and library system, you neither need nor want
> > soft-float. The kernel does FP instruction emulation. Running soft-float
> > would make for faster, if larger, code, but requires that the whole
> > system, particularly glibc, be built for soft-float, which is rarely done
> > (and the last time I tried it, didin't quite work with the standard
> > glibc sources out-of-the-box).
> >
> Correct. I use the FP emulator in Linux for my TX3917/PR31700 stuff. I
> have had no problems. Current glibc has assembly code that assumes hardware
> floating point which is why building for soft-float does not work out of
> the box. There are probably some patches out there to rectify that.
It's been several years, but the last time I dealt with it, it wasn't all
that hard to fix if you knew what you were doing, but it was a couple
of days' work just the same.
> Also, I have some documents for the 3912 on my FTP site:
>
> ftp://ftp.realitydiluted.com/docs/Toshiba
> ftp://ftp.realitydiluted.com/docs/Philips
>
> It should be noted that the Toshiba TX3912 and the Philips PR31700 are
> identical cores. There was definitely some cross-licensing going on there.
> Perhaps Kevin or Dominic would know this in more detail, but it is not
> really that important.
I'm not sure whether any NDAs which may or may not exist
would have expired by now, so I'll stick to a "no comment". ;o)
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: r3000 instruction set
@ 2004-02-23 7:03 ` Kevin D. Kissell
0 siblings, 0 replies; 25+ messages in thread
From: Kevin D. Kissell @ 2004-02-23 7:03 UTC (permalink / raw)
To: Steven J. Hill; +Cc: Eric Christopher, Mark and Janice Juszczec, linux-mips
> > The 3912 has no FPU, but if you're running on any contemporary
> > MIPS/Linux kernel and library system, you neither need nor want
> > soft-float. The kernel does FP instruction emulation. Running soft-float
> > would make for faster, if larger, code, but requires that the whole
> > system, particularly glibc, be built for soft-float, which is rarely done
> > (and the last time I tried it, didin't quite work with the standard
> > glibc sources out-of-the-box).
> >
> Correct. I use the FP emulator in Linux for my TX3917/PR31700 stuff. I
> have had no problems. Current glibc has assembly code that assumes hardware
> floating point which is why building for soft-float does not work out of
> the box. There are probably some patches out there to rectify that.
It's been several years, but the last time I dealt with it, it wasn't all
that hard to fix if you knew what you were doing, but it was a couple
of days' work just the same.
> Also, I have some documents for the 3912 on my FTP site:
>
> ftp://ftp.realitydiluted.com/docs/Toshiba
> ftp://ftp.realitydiluted.com/docs/Philips
>
> It should be noted that the Toshiba TX3912 and the Philips PR31700 are
> identical cores. There was definitely some cross-licensing going on there.
> Perhaps Kevin or Dominic would know this in more detail, but it is not
> really that important.
I'm not sure whether any NDAs which may or may not exist
would have expired by now, so I'll stick to a "no comment". ;o)
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: r3000 instruction set
2004-02-22 21:52 ` Kevin D. Kissell
(?)
(?)
@ 2004-02-23 3:37 ` Eric Christopher
2004-02-23 7:11 ` Kevin D. Kissell
-1 siblings, 1 reply; 25+ messages in thread
From: Eric Christopher @ 2004-02-23 3:37 UTC (permalink / raw)
To: Kevin D. Kissell; +Cc: Mark and Janice Juszczec, linux-mips
On Sun, 2004-02-22 at 13:52, Kevin D. Kissell wrote:
> > Other than the responses you've already gotten, likely you'll need to
> > compile with -march=r3900(or -mcpu=r3900 if it's an old toolchain) since
> > the 3900 is missing a couple of r3000 instructions iirc.
>
> The 3900 family should run MIPS I code compiled for the R3000.
IIRC there were some standard MIPS I instructions that were not on the
tx39.
-eric
--
Eric Christopher <echristo@redhat.com>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: r3000 instruction set
@ 2004-02-23 7:11 ` Kevin D. Kissell
0 siblings, 0 replies; 25+ messages in thread
From: Kevin D. Kissell @ 2004-02-23 7:11 UTC (permalink / raw)
To: Eric Christopher; +Cc: Mark and Janice Juszczec, linux-mips
> On Sun, 2004-02-22 at 13:52, Kevin D. Kissell wrote:
> > > Other than the responses you've already gotten, likely you'll need to
> > > compile with -march=r3900(or -mcpu=r3900 if it's an old toolchain) since
> > > the 3900 is missing a couple of r3000 instructions iirc.
> >
> > The 3900 family should run MIPS I code compiled for the R3000.
>
> IIRC there were some standard MIPS I instructions that were not on the
> tx39.
I think you may be confusing MIPS I and MIPS II. I'm pretty darn certain
that the TX39 inplemented all of MIPS I, most of MIPS II, plus a MADD
extension. I'm not going to go instruction counting this morning, but the
TX39 spec declares up-front that it's a superset of the R3000A.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: r3000 instruction set
@ 2004-02-23 7:11 ` Kevin D. Kissell
0 siblings, 0 replies; 25+ messages in thread
From: Kevin D. Kissell @ 2004-02-23 7:11 UTC (permalink / raw)
To: Eric Christopher; +Cc: Mark and Janice Juszczec, linux-mips
> On Sun, 2004-02-22 at 13:52, Kevin D. Kissell wrote:
> > > Other than the responses you've already gotten, likely you'll need to
> > > compile with -march=r3900(or -mcpu=r3900 if it's an old toolchain) since
> > > the 3900 is missing a couple of r3000 instructions iirc.
> >
> > The 3900 family should run MIPS I code compiled for the R3000.
>
> IIRC there were some standard MIPS I instructions that were not on the
> tx39.
I think you may be confusing MIPS I and MIPS II. I'm pretty darn certain
that the TX39 inplemented all of MIPS I, most of MIPS II, plus a MADD
extension. I'm not going to go instruction counting this morning, but the
TX39 spec declares up-front that it's a superset of the R3000A.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: r3000 instruction set
2004-02-23 7:11 ` Kevin D. Kissell
(?)
@ 2004-02-23 7:29 ` Eric Christopher
-1 siblings, 0 replies; 25+ messages in thread
From: Eric Christopher @ 2004-02-23 7:29 UTC (permalink / raw)
To: Kevin D. Kissell; +Cc: Mark and Janice Juszczec, linux-mips
> I think you may be confusing MIPS I and MIPS II. I'm pretty darn certain
> that the TX39 inplemented all of MIPS I, most of MIPS II, plus a MADD
> extension. I'm not going to go instruction counting this morning, but the
> TX39 spec declares up-front that it's a superset of the R3000A.
Me either so until I guess the guy says which instruction is at fault
we'll leave it be. :)
-eric
--
Eric Christopher <echristo@redhat.com>
^ permalink raw reply [flat|nested] 25+ messages in thread
end of thread, other threads:[~2004-03-01 15:38 UTC | newest]
Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-23 20:48 r3000 instruction set Mark and Janice Juszczec
2004-02-23 22:46 ` Kevin D. Kissell
2004-02-23 22:46 ` Kevin D. Kissell
-- strict thread matches above, loose matches on Subject: below --
2004-03-01 15:38 Mark and Janice Juszczec
2004-02-23 16:56 Mark and Janice Juszczec
2004-02-23 17:07 ` Michael Uhler
2004-02-23 17:13 ` Maciej W. Rozycki
2004-02-23 17:21 ` Kevin D. Kissell
2004-02-23 17:21 ` Kevin D. Kissell
2004-02-23 17:59 ` Dominic Sweetman
2004-02-22 3:02 Mark and Janice Juszczec
2004-02-22 3:15 ` Michael Uhler
2004-02-22 9:32 ` Kevin D. Kissell
2004-02-22 9:32 ` Kevin D. Kissell
2004-02-22 12:31 ` Dominic Sweetman
2004-02-22 19:13 ` Eric Christopher
2004-02-22 21:52 ` Kevin D. Kissell
2004-02-22 21:52 ` Kevin D. Kissell
2004-02-23 3:03 ` Steven J. Hill
2004-02-23 7:03 ` Kevin D. Kissell
2004-02-23 7:03 ` Kevin D. Kissell
2004-02-23 3:37 ` Eric Christopher
2004-02-23 7:11 ` Kevin D. Kissell
2004-02-23 7:11 ` Kevin D. Kissell
2004-02-23 7:29 ` Eric Christopher
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.