All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stafford Horne <shorne@gmail.com>
To: openrisc@lists.librecores.org
Subject: [OpenRISC] OpenRISC 1.3 spec
Date: Fri, 26 Apr 2019 06:17:02 +0900	[thread overview]
Message-ID: <20190425211702.GG32284@lianli.shorne-pla.net> (raw)
In-Reply-To: <3D70BAC7A5B64C0E977D84EC118F146E@BAndViG>

Hello,

On Sun, Apr 14, 2019 at 12:41:56PM +0300, BAndViG wrote:
> Hi, Stafford, Richard
> 
> > > > I propose:
> > > >
> > > >   bit-10 - 1 indicates if rd2 is +2
> > > >   bit-9  - 1 indicates if ra2 is +2
> > > >   bit-8  - 1 indicates if rb2 is +2
> > >
> > > Thanks.  LGTM.

Sorry, it took time, I had visitors at home last week, and I needed to relearn
how cgen worked.

This is implemented in binutils now. See my patches here:

  - https://github.com/stffrdhrn/binutils-gdb/commits/orfpx64a32-3

I have not squashed the commits because it makes it a bit easier for reviewing
what I did to get these flags working.

> > I was thinking, do you think these orfpx64a32 instructions should have
> > different
> > opcodes to distinguish between true 64-bit and 32-bit double instructions?
> > Otherwise we would not really be able to run these orfpx64a32 32-bit
> > binaries on
> > 64-bit CPU's if 64-bit cpus ever get implemented.
> 
> Is it assumed that 64-bit and 32-bit OpenRISC CPUs should be binary compatible?
> If not, I think it is should be normal that:
> - assembler instructions lf.*.d look different
> - 64-bit CPU just ignores bits [10:8]

The only concern I have with '64-bit CPU just ignores bits [10:8]' is when we
have 32-bit code that expects output in a 32-bit pair.  i.e.

  l.ftoi.d  r13,r14, r15,r16
  l.sfne    r14, r0
  ...

In 64-bit it would translate to:

  l.ftoi.d  r13, r15
  l.sfne    r14, r0
  ...

Which would make no sense as r14 would not ever be touched.  This kind of code
would not work on a 64-bit cpu.

> Also, let me remember here that I made initial implementation for unordered
> comparison (for MAROCCHINO pipe currently). The verilog sources are in
> branch
> https://github.com/openrisc/or1k_marocchino/tree/fp_unordered_cmp
> To keep full backward compatibility with current opcodes the proposed
> variant differs from Richard's P11 and looks as following:
> 
> lf.sfueq.s rA,rB (opc: 0x28)
> lf.sfueq.d rA,rB (opc: 0x38)
> lf.sfune.s rA,rB (opc: 0x29)
> lf.sfune.d rA,rB (opc: 0x39)
> lf.sfugt.s rA,rB (opc: 0x2A)
> lf.sfugt.d rA,rB (opc: 0x3A)
> lf.sfuge.s rA,rB (opc: 0x2B)
> lf.sfuge.d rA,rB (opc: 0x3B)
> lf.sfult.s rA,rB (opc: 0x2C)
> lf.sfult.d rA,rB (opc: 0x3C)
> lf.sfule.s rA,rB (opc: 0x2D)
> lf.sfule.d rA,rB (opc: 0x3D)
> lf.sfun.s rA,rB (opc: 0x2E)
> lf.sfun.d rA,rB (opc: 0x3E)
> 
> OPC's bit [5] indicates that comparison is unordered and bit [4] that
> operands are doubles.
> Additionally I’ve added fp_comparisons_table.odt document into doc/readme/
> folder with description of all implemented FP comparison instructions and
> their relation to IEEE standard.
> I haven’t tested them yet as there is no tool now.
> 
> Of course, as Staffor wrote "Its not too late if its before silicon ;)"

Right, let me look to add these to binutils then GCC in a second series of
patches.

> WBR
> Andrey
> 

  reply	other threads:[~2019-04-25 21:17 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-12 20:56 [OpenRISC] OpenRISC 1.3 spec Stafford Horne
2019-04-12 21:17 ` Richard Henderson
2019-04-12 21:48   ` Stafford Horne
2019-04-13  8:11     ` Richard Henderson
2019-04-13  8:47       ` Stafford Horne
2019-04-14  9:41         ` BAndViG
2019-04-25 21:17           ` Stafford Horne [this message]
2019-04-26 22:22             ` Stafford Horne
2019-05-02 12:22               ` BAndViG
2019-05-07 15:28             ` Richard Henderson
2019-05-07 21:12               ` Stafford Horne
2019-05-08 18:05                 ` BAndViG
2019-05-09 20:29                   ` Stafford Horne
2019-05-09 21:47                   ` Richard Henderson
2019-05-10  7:56                     ` BAndViG
2019-05-11 10:04                       ` Stafford Horne
2019-05-12 19:58                         ` BAndViG
2019-05-12 23:09                           ` Stafford Horne
2019-06-06 22:11                           ` Stafford Horne
2019-06-15  6:14                             ` Stafford Horne
2019-04-13  8:03 ` Richard Henderson
2019-04-14  6:30   ` Stafford Horne
2019-04-14  6:48     ` Stafford Horne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190425211702.GG32284@lianli.shorne-pla.net \
    --to=shorne@gmail.com \
    --cc=openrisc@lists.librecores.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.