From 891877d67d8e5e46b8094f7b6ba69957e844a5d0 Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Mon, 30 Nov 2015 17:11:18 -0500 Subject: plan work on isel --- lisc/FP | 33 +++++++++++++++++++++++++++++++++ lisc/fpintro.txt | 23 ----------------------- 2 files changed, 33 insertions(+), 23 deletions(-) create mode 100644 lisc/FP delete mode 100644 lisc/fpintro.txt diff --git a/lisc/FP b/lisc/FP new file mode 100644 index 0000000..f448015 --- /dev/null +++ b/lisc/FP @@ -0,0 +1,33 @@ +Instructions classification: +FP : add, sub, mul, sdiv, copy, par, arg +Maybe : and, or, xor, cmp(6) +Non FP: udiv, srem, urem, store(4), load(7), + ext(7), alloc(5), parc, argc, call + +15 bits for operations 32768 +-1 bit for s,d 16384 + +New conversion instructions: + - Bitcast conversion between fp and ints. cast + - Convert fp to/from int. ftosi sitof (only signed at first, truncation) + - Convert single to/from double fconv + +Summary: + Add cast, ftosi sitof, fconv + Add a 'floating point' bit to instructions + Conversions from/to unsigned types are hard! + I need to find a reference for that. + +Problem with "cls" field: for comparisons, this field is +for the argument of the instruction, but, in the case of +Load (for example), it is about the result. + +Roadmap in isel. + Make sure all floating point immediates are accessed + through a memory load. The load can be fused in some + instructions (add, sub, mul, div). This should be + handled similarly to the large integer constants. + + Complete ABI implementation, we should only need the + movsd instruction to transfer between sse registers and + memory. diff --git a/lisc/fpintro.txt b/lisc/fpintro.txt deleted file mode 100644 index 9bfaf24..0000000 --- a/lisc/fpintro.txt +++ /dev/null @@ -1,23 +0,0 @@ -Instructions classification: -FP : add, sub, mul, copy, par, arg -Maybe : and, or, xor, cmp(6) -Non FP: sdiv, udiv, srem, urem, store(4), - load(7), ext(7), alloc(5), parc, argc, call - -15 bits for operations 32768 --1 bit for s,d 16384 - -New conversion instructions: - - Bitcast conversion between fp and ints. cast - - Convert fp to/from int. ftosi sitof (only signed at first, truncation) - - Convert single to/from double stod dtos - -Summary: - Add cast, ftosi sitof, stod dtos - Add a 'floating point' bit to instructions - Conversions from/to unsigned types are hard! - I need to find a reference for that. - -Problem with "cls" field: for comparisons, this field is -for the argument of the instruction, but, in the case of -Load (for example), it is about the result. -- cgit 1.4.1