Discussion:
[OpenRISC] or1knd? (was: Re: [Openrisc] Patching config.sub / config.guess)
Geert Uytterhoeven
2014-03-09 09:49:30 UTC
Permalink
Since binutils contains code that targets or1knd, I'm going to submit
Pardon my ignorance, but what's the difference between or1k and or1knd?
I tried Google, but didn't become wiser.

Thanks!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ***@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Christian Svensson
2014-03-09 10:19:06 UTC
Permalink
Hi,

nd in or1knd is stands for No Delay. It's or1k but with no delay slot.
Post by Geert Uytterhoeven
Since binutils contains code that targets or1knd, I'm going to submit
Pardon my ignorance, but what's the difference between or1k and or1knd?
I tried Google, but didn't become wiser.
Thanks!
Gr{oetje,eeting}s,
Geert
--
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Jeremy Bennett
2014-03-09 13:38:26 UTC
Permalink
Post by Christian Svensson
Hi,
nd in or1knd is stands for No Delay. It's or1k but with no delay slot.
Hi Christian,

I do rather wonder if this justifies having a different architecture
name. I would expect it to be an option in the tool chain (-mno-delay
for example).

The usual case where you have variants in the architecture name is for
endianness. For example arc (little-endian) and arceb (bit-endian). What
do we do about the little-endian variants of OR1K. Do we have or1kndel
and or1kel?


Jeremy
Post by Christian Svensson
Post by Geert Uytterhoeven
Since binutils contains code that targets or1knd, I'm going to submit
Pardon my ignorance, but what's the difference between or1k and or1knd?
I tried Google, but didn't become wiser.
Thanks!
Gr{oetje,eeting}s,
Geert
--
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
Tel: +44 (1590) 610184
Cell: +44 (7970) 676050
SkypeID: jeremybennett
Twitter: @jeremypbennett
Email: ***@embecosm.com
Web: www.embecosm.com
Christian Svensson
2014-03-09 13:50:14 UTC
Permalink
Hi,

I guess so. Aarch64 has aarch64_be IIRC. In that case it would be
or1k_le and or1knd_le.

or1knd has a non-trivial presence in our code base, and it changes a
quite fundamental assumption of the or1k architecture.
Running or1knd code on or1k (or the other way around) would certainly
produce all kinds of weird results, I'm not sure it's something you
would like to tweak with a flag. Possibly we could add a flag to make
the code generated usable for both by always putting nop where the
delay slots would be.

On Sun, Mar 9, 2014 at 1:38 PM, Jeremy Bennett
Post by Jeremy Bennett
Post by Christian Svensson
Hi,
nd in or1knd is stands for No Delay. It's or1k but with no delay slot.
Hi Christian,
I do rather wonder if this justifies having a different architecture
name. I would expect it to be an option in the tool chain (-mno-delay
for example).
The usual case where you have variants in the architecture name is for
endianness. For example arc (little-endian) and arceb (bit-endian). What
do we do about the little-endian variants of OR1K. Do we have or1kndel
and or1kel?
Jeremy
Post by Christian Svensson
Post by Geert Uytterhoeven
Since binutils contains code that targets or1knd, I'm going to submit
Pardon my ignorance, but what's the difference between or1k and or1knd?
I tried Google, but didn't become wiser.
Thanks!
Gr{oetje,eeting}s,
Geert
--
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
Tel: +44 (1590) 610184
Cell: +44 (7970) 676050
SkypeID: jeremybennett
Web: www.embecosm.com
Christian Svensson
2014-03-09 14:00:16 UTC
Permalink
Actually, looking at the code - it appears we have these things today:
Christian Svensson
2014-03-11 11:58:51 UTC
Permalink
So I guess I'll hold off with this patch until we know that or1knd
will be a thing in the binutils port (as in: if or1knd get accepted in
binutils, I will submit this patch).

Stay tuned
Christian Svensson
2014-03-16 22:28:02 UTC
Permalink
The binutils patch seems to be going through and no questions regarding
or1knd surfaced.
Jeremy: Are you still against this patch or does it have your blessing?
Post by Christian Svensson
So I guess I'll hold off with this patch until we know that or1knd
will be a thing in the binutils port (as in: if or1knd get accepted in
binutils, I will submit this patch).
Stay tuned
Jeremy Bennett
2014-03-26 17:37:31 UTC
Permalink
Post by Christian Svensson
The binutils patch seems to be going through and no questions regarding
or1knd surfaced.
Jeremy: Are you still against this patch or does it have your blessing?
Hi Christian,

Just surfacing after a busy fortnight!

I still think it's a wrong turn, but I bow to the collective will and so
support this. If they are happy upstream it can't be a problem.

Best wishes,


Jeremy
--
Tel: +44 (1590) 610184
Cell: +44 (7970) 676050
SkypeID: jeremybennett
Twitter: @jeremypbennett
Email: ***@embecosm.com
Web: www.embecosm.com
Peter Gavin
2014-03-09 16:36:15 UTC
Permalink
Post by Christian Svensson
or1knd has a non-trivial presence in our code base, and it changes a
quite fundamental assumption of the or1k architecture.
Running or1knd code on or1k (or the other way around) would certainly
produce all kinds of weird results, I'm not sure it's something you
would like to tweak with a flag. Possibly we could add a flag to make
the code generated usable for both by always putting nop where the
delay slots would be.
There are 3 flags, IIRC: -mdelay, -mno-delay, and -mcompat-delay. The
third one does what you're suggesting here.

BTW the effect of changing between or1k and or1knd at configure time is
just to change which of these is the default. No matter which is chosen,
you can still use one of the flags to change the delay-slot setting.

-Pete
Post by Christian Svensson
On Sun, Mar 9, 2014 at 1:38 PM, Jeremy Bennett
Post by Jeremy Bennett
Post by Christian Svensson
Hi,
nd in or1knd is stands for No Delay. It's or1k but with no delay slot.
Hi Christian,
I do rather wonder if this justifies having a different architecture
name. I would expect it to be an option in the tool chain (-mno-delay
for example).
The usual case where you have variants in the architecture name is for
endianness. For example arc (little-endian) and arceb (bit-endian). What
do we do about the little-endian variants of OR1K. Do we have or1kndel
and or1kel?
Jeremy
Post by Christian Svensson
On Sun, Mar 9, 2014 at 9:49 AM, Geert Uytterhoeven <
Post by Geert Uytterhoeven
Since binutils contains code that targets or1knd, I'm going to submit
Pardon my ignorance, but what's the difference between or1k and or1knd?
I tried Google, but didn't become wiser.
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 --
In personal conversations with technical people, I call myself a
hacker. But
Post by Jeremy Bennett
Post by Christian Svensson
Post by Geert Uytterhoeven
when I'm talking to journalists I just say "programmer" or something
like that.
Post by Jeremy Bennett
Post by Christian Svensson
Post by Geert Uytterhoeven
-- Linus Torvalds
--
Tel: +44 (1590) 610184
Cell: +44 (7970) 676050
SkypeID: jeremybennett
Web: www.embecosm.com
_______________________________________________
OpenRISC mailing list
http://lists.openrisc.net/listinfo/openrisc
Jeremy Bennett
2014-03-09 16:48:14 UTC
Permalink
Post by Christian Svensson
or1knd has a non-trivial presence in our code base, and it changes a
quite fundamental assumption of the or1k architecture.
Running or1knd code on or1k (or the other way around) would certainly
produce all kinds of weird results, I'm not sure it's something you
would like to tweak with a flag. Possibly we could add a flag to make
the code generated usable for both by always putting nop where the
delay slots would be.
There are 3 flags, IIRC: -mdelay, -mno-delay, and -mcompat-delay. The
third one does what you're suggesting here.
BTW the effect of changing between or1k and or1knd at configure time is
just to change which of these is the default. No matter which is
chosen, you can still use one of the flags to change the delay-slot setting.
Thanks for the info. This seems a compelling reason to just have or1k
and dropping or1knd.

Best wishes,


Jeremy
--
Tel: +44 (1590) 610184
Cell: +44 (7970) 676050
SkypeID: jeremybennett
Twitter: @jeremypbennett
Email: ***@embecosm.com
Web: www.embecosm.com
Christian Svensson
2014-03-09 17:05:04 UTC
Permalink
On Sun, Mar 9, 2014 at 4:48 PM, Jeremy Bennett
Post by Jeremy Bennett
Thanks for the info. This seems a compelling reason to just have or1k
and dropping or1knd.
I don't agree. You would have to explicitly do something like
./configure --target=or1k-linux CFLAGS='-mno-delay' for every package
you would build.
I think having a compiler with sensible defaults is the way to go. If
you're developing for a or1k variant without delay slots the default
output wouldn't even run.
Peter Gavin
2014-03-09 17:12:48 UTC
Permalink
Post by Christian Svensson
On Sun, Mar 9, 2014 at 4:48 PM, Jeremy Bennett
Post by Jeremy Bennett
Thanks for the info. This seems a compelling reason to just have or1k
and dropping or1knd.
I don't agree. You would have to explicitly do something like
./configure --target=or1k-linux CFLAGS='-mno-delay' for every package
you would build.
I think having a compiler with sensible defaults is the way to go. If
you're developing for a or1k variant without delay slots the default
output wouldn't even run.
This. There would be no way to have a native gcc that compiles correct
code without any flags, which could potentially break a lot of things.

Also, using or1knd is consistent with the practice used by other
architectures with incompatible variants, e.g. armhf for the ARM variant
used in the Raspberry Pi.

And I know there's no core available to run or1knd code yet, but I've got
one coming. A few things left to finish and I'll be releasing something :)

-Pete
Stefan Kristiansson
2014-03-09 18:51:05 UTC
Permalink
Post by Peter Gavin
And I know there's no core available to run or1knd code yet, but I've got
one coming. A few things left to finish and I'll be releasing something :)
We've got the mor1kx pronto-espresso too, that is a non-delay slot
implementation.

Stefan
Jeremy Bennett
2014-03-09 17:17:42 UTC
Permalink
Post by Christian Svensson
On Sun, Mar 9, 2014 at 4:48 PM, Jeremy Bennett
Post by Jeremy Bennett
Thanks for the info. This seems a compelling reason to just have or1k
and dropping or1knd.
I don't agree. You would have to explicitly do something like
./configure --target=or1k-linux CFLAGS='-mno-delay' for every package
you would build.
I think having a compiler with sensible defaults is the way to go. If
you're developing for a or1k variant without delay slots the default
output wouldn't even run.
All sorts of compilers fail to run code if you choose the wrong
architecture flags. The various AVR variants are a good example -
different chips have different sizes of register, and different ABIs,
but they are all avr-gcc.

I believe this is what -march flags are for. I can only recall seeing
variant architecture names used for endianness. Some architectures even
do that through flags.

Might be worth asking for an upstream opinion - ultimately they are the
guys who need to accept that or1k and or1knd are two distinct architectures.

Best wishes,


Jeremy
--
Tel: +44 (1590) 610184
Cell: +44 (7970) 676050
SkypeID: jeremybennett
Twitter: @jeremypbennett
Email: ***@embecosm.com
Web: www.embecosm.com
Loading...