Re: [PATCH] Add unboxed floating point comparison instructions.

2017-01-12 Thread Thompson, David
Hi Andy, On Mon, Jan 9, 2017 at 4:23 PM, Andy Wingo wrote: > On Mon 09 Jan 2017 02:09, "Thompson, David" writes: > >> + /* br-if-f64= a:12 b:12 invert:1 _:7 offset:24 > > Missing - before the =. > >> + /* br-if-f64< a:12 b:12 invert:1 _:7 offset:24 > > Here too. > > Please fix these nits and t

Re: [PATCH] Add unboxed floating point comparison instructions.

2017-01-09 Thread Thompson, David
3a4 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Mon, 12 Dec 2016 22:46:08 -0500 Subject: [PATCH] Add unboxed floating point comparison instructions. * libguile/vm-engine.c (BR_F64_ARITHMETIC): New preprocessor macro. (br_if_f64_ee, br_if_f64_lt, br_if_f64_le, br_if_f64_gt, br_if_f64_ge):

Re: [PATCH] Add unboxed floating point comparison instructions.

2017-01-09 Thread Andy Wingo
On Mon 09 Jan 2017 02:09, "Thompson, David" writes: > + /* br-if-f64= a:12 b:12 invert:1 _:7 offset:24 Missing - before the =. > + /* br-if-f64< a:12 b:12 invert:1 _:7 offset:24 Here too. Please fix these nits and then LGTM; please push directly. Thanks! Andy

Re: [PATCH] Add unboxed floating point comparison instructions.

2017-01-08 Thread Thompson, David
floating point comparison instructions. * libguile/vm-engine.c (BR_F64_ARITHMETIC): New preprocessor macro. (br_if_f64_ee, br_if_f64_lt, br_if_f64_le, br_if_f64_gt, br_if_f64_ge): New VM instructions. * doc/ref/vm.texi ("Unboxed Floating-Point Arithmetic"): Document them. * module/la

Re: [PATCH] Add unboxed floating point comparison instructions.

2017-01-08 Thread Andy Wingo
On Thu 05 Jan 2017 02:41, "Thompson, David" writes: > + VM_DEFINE_OP (189, br_if_f64_le, "br-if-f64-<=", OP3 (X8_S24, X8_S24, > B1_X7_L24)) Missing inline docs. > + /* br-if-f64-> a:24 _:8 b:24 invert:1 _:7 offset:24 > + * > + * If the F64 value in A is > than the SCM value in B, add OFF

Re: [PATCH] Add unboxed floating point comparison instructions.

2017-01-04 Thread Thompson, David
d it is easy > for a naive compiler to destroy the properties of carefully written > numerical codes. I was more ignorant of floating point arithmetic than I realized, so thanks for the education here. The good news is that I was able to just remove all changes to types.scm to resolve these

Re: [PATCH] Add unboxed floating point comparison instructions.

2016-12-21 Thread Mark H Weaver
Andy Wingo writes: > I think &min/0 should be replaced by (&min/f64). Probably also you need > a good +nan.0 story here; does this do the right thing? e.g. > > (let ((a +nan.0)) > (if (< a 100.0) > (< a 200.0) > (> a 50.0))) > > Does this fold to #t? I think for +nan.0 it

Re: [PATCH] Add unboxed floating point comparison instructions.

2016-12-21 Thread Andy Wingo
Hi! Patch looks good, just a couple of nits. On Wed 14 Dec 2016 15:51, "Thompson, David" writes: > + VM_DEFINE_OP (189, br_if_f64_le, "br-if-f64-<=", OP3 (X8_S24, X8_S24, > B1_X7_L24)) > +{ > + BR_F64_ARITHMETIC (<=); > +} Missing inline docs for this one. > @@ -283,6 +297,8 @@

Re: [PATCH] Add unboxed floating point comparison instructions.

2016-12-14 Thread Thompson, David
Here is an updated patch. All of the code is the same but I added docs in doc/ref/vm.texi. - Dave From 7d8017812a77489f362c2b9b97ee0988e5d3d7bc Mon Sep 17 00:00:00 2001 From: David Thompson Date: Mon, 12 Dec 2016 22:46:08 -0500 Subject: [PATCH] Add unboxed floating point comparison instructions

[PATCH] Add unboxed floating point comparison instructions.

2016-12-13 Thread David Thompson
, 12 Dec 2016 22:46:08 -0500 Subject: [PATCH] Add unboxed floating point comparison instructions. * libguile/vm-engine.c (BR_F64_ARITHMETIC): New preprocessor macro. (br_if_f64_ee, br_if_f64_lt, br_if_f64_le, br_if_f64_gt, br_if_f64_ge): New VM instructions. * module/language/cps/compile-byt