Libre RISC-V Mailing list Archives (accessible via public-inbox)
 help / color / Atom feed
From: bugzilla-daemon@libre-riscv.org
To: libre-riscv-dev@lists.libre-riscv.org
Subject: [libre-riscv-dev] [Bug 267] The efficiency of adder/subtractor
Date: Thu, 26 Mar 2020 23:10:07 +0000
Message-ID: <bug-267-13-VjjJk21Mdy@http.bugs.libre-riscv.org/> (raw)
In-Reply-To: <bug-267-13@http.bugs.libre-riscv.org/>

http://bugs.libre-riscv.org/show_bug.cgi?id=267

--- Comment #1 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Jock Tanner from comment #0)

> Actually I was thinking about what Harris&Harris suggested in their famous
> book. You just have to have an inverter on one operand input of an adder.
> The two's complement of that operand can be achieved via the carry input.

yes, interestingly, michael and i are reviewing in the simulator, various
implementations (microwatt, qemu, pear_pc), they all seem to do this
http://bugs.libre-riscv.org/show_bug.cgi?id=186#c130

it looks like power was extremely well designed, and microwatt as well,
to basically "translate" opcodes into "everything is an ADD, but you
optionally do add1, add0, add-carry, occasionally invert op1,
oh and farm out carry to different places, or set carry to 0, or 1" etc. etc.

it's quite neat.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

  reply index

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-26 22:05 [libre-riscv-dev] [Bug 267] New: " bugzilla-daemon
2020-03-26 23:10 ` bugzilla-daemon [this message]
2020-04-07  5:23 ` [libre-riscv-dev] [Bug 267] " bugzilla-daemon
2020-04-07  9:48 ` bugzilla-daemon
2020-04-07 11:39 ` bugzilla-daemon
2020-04-07 11:48 ` bugzilla-daemon
2020-04-07 13:15 ` bugzilla-daemon
2020-04-07 13:36 ` bugzilla-daemon
2020-04-07 13:38 ` bugzilla-daemon
2020-04-07 14:44 ` bugzilla-daemon
2020-04-07 15:14   ` whygee
2020-04-07 15:25     ` Jacob Lifshay
2020-04-07 15:46       ` whygee

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=bug-267-13-VjjJk21Mdy@http.bugs.libre-riscv.org/ \
    --to=bugzilla-daemon@libre-riscv.org \
    --cc=libre-riscv-dev@lists.libre-riscv.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

Libre RISC-V Mailing list Archives (accessible via public-inbox)

Archives are clonable: git clone --mirror https://inbox.libre-soc.org/libre-riscv-dev

Example config snippet for mirrors


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git