Commit graph

43 commits

Author SHA1 Message Date
Bor Grošelj Simić
3964574a83 implement float -> unsigned casts
amd64 lacks instruction for this so it has to be implemented with
float -> signed casts. The approach is borrowed from llvm.
2022-01-28 09:24:15 +01:00
Bor Grošelj Simić
74d022f975 implement unsigned -> float casts
amd64 lacks an instruction for this so it has to be implemented with
signed -> float casts:
 - Word casting is done by zero-extending the word to a long and then doing
   a regular signed cast.
 - Long casting is done by dividing by two with correct rounding if the
   highest bit is set and casting that to float, then adding
   1 to mantissa with integer addition
2022-01-28 09:24:15 +01:00
Eyal Sawady
e91d121581 Add a negation instruction
Necessary for floating-point negation, because
`%result = sub 0, %operand` doesn't give the correct sign for 0/-0.
2022-01-23 11:43:59 +01:00
Quentin Carbonneaux
fcdef10dae make variadic args explicit
Some abis, like the riscv one, treat
arguments differently depending on
whether they are variadic or not.
To prepare for the upcomming riscv
target, we change the variadic call
syntax and give meaning to the
location of the '...' marker.

  # new syntax
  %ret =w call $f(w %regular, ..., w %variadic)

By nature of their abis, the change
is backwards compatible for existing
targets.
2021-10-22 23:53:25 +02:00
Quentin Carbonneaux
5e5e301e86 fix a typo in call's BNF
Thanks to Jakob for pointing this out.
2020-08-06 10:34:42 +02:00
Michael Forney
cf9f2e8ef7 doc: Aggregate types can be nested 2019-02-21 09:36:35 +01:00
Michael Forney
fcd55bb441 doc: Include align in data BNF 2019-02-21 09:27:05 +01:00
Quentin Rameau
51c46ba691 Small corrections in documentation 2017-04-26 09:35:05 -04:00
Quentin Carbonneaux
0d77e262a6 documentation update 2017-04-18 10:02:14 -04:00
Quentin Carbonneaux
6fd78ec78f nits in the documentation 2017-04-08 22:10:02 -04:00
Quentin Carbonneaux
a940cc808e turn the instruction index into a list 2017-02-22 12:30:44 -05:00
Quentin Rameau
835b2b4910 create an index for the instructions in the IL doc 2017-02-03 09:26:43 -05:00
Quentin Rameau
cec21e6540 create an instruction index for the IL doc 2017-01-20 11:26:37 -05:00
Quentin Rameau
9fbb276e37 change 'b' and 'h' ordering in IL doc 2017-01-20 11:25:46 -05:00
Quentin Carbonneaux
6ed62fe945 doc nits 2016-11-09 22:34:05 -05:00
Quentin Carbonneaux
97d33be074 update documentation with new fp conversions 2016-04-22 15:16:47 -04:00
Quentin Carbonneaux
1c96401f0c oops fix wrong instruction names in doc 2016-04-21 14:27:15 -04:00
Quentin Carbonneaux
84bb28c042 support calls with no return
I thought it would be harder (and maybe it is).
My fear was that a call must be always followed by
a parallel move from machine registers (this is an
assumption in both spill and rega).  This however
remains true, because the ABI code generates a
dummy "copy RAX" by accident!
2016-04-20 12:53:42 -04:00
Quentin Carbonneaux
fbbd2252aa typos in il.txt, thanks Robert Ransom 2016-03-29 17:35:37 -04:00
Quentin Carbonneaux
8ac4af4875 document new shift operations 2016-03-16 11:40:47 -04:00
Quentin Carbonneaux
1b27215003 document exts and truncd 2016-03-15 14:07:13 -04:00
Quentin Carbonneaux
f691d4fb6b doc is now complete 2016-03-15 13:50:34 -04:00
Quentin Carbonneaux
714c472055 massage Instructions section 2016-03-15 10:44:05 -04:00
Quentin Carbonneaux
15aa877cae finish the Memory section 2016-03-14 20:52:34 -04:00
Quentin Carbonneaux
69e051ae4e compactify some instruction lists 2016-03-14 17:07:47 -04:00
Quentin Carbonneaux
68c3b7ba51 start doc on memory instructions 2016-03-14 16:49:32 -04:00
Quentin Carbonneaux
433ab81939 start description of instructions 2016-03-14 16:30:53 -04:00
Quentin Carbonneaux
ffb9e98152 rework the types section 2016-03-13 09:44:46 -04:00
Quentin Carbonneaux
e76a6f7339 less redundancy in il.html 2016-03-13 09:28:39 -04:00
Quentin Carbonneaux
0e89049f01 BNF Syntax becomes Notation 2016-03-11 13:24:55 -05:00
Quentin Carbonneaux
01278dbeca document constants 2016-03-11 13:22:44 -05:00
Quentin Carbonneaux
5f80243857 style 2016-03-10 16:21:44 -05:00
Quentin Carbonneaux
e616988515 move constant section higher 2016-03-10 16:16:19 -05:00
Quentin Carbonneaux
ff9990ed6f be more precise 2016-03-10 16:12:04 -05:00
Quentin Carbonneaux
1e6d05e6dd flesh Control section 2016-03-10 16:06:41 -05:00
Quentin Carbonneaux
00ea8464a0 number Control section 2016-03-09 15:50:09 -05:00
Quentin Carbonneaux
7973a4486f pheew, more il description 2016-03-09 15:42:28 -05:00
Quentin Carbonneaux
34d97d4102 add links in toc 2016-03-08 21:16:34 -05:00
Quentin Carbonneaux
a5d2c1334f fix typos in il.txt 2016-03-08 15:50:20 -05:00
Quentin Carbonneaux
1ae7f20cfe fix indent in BNF block 2016-03-08 14:46:06 -05:00
Quentin Carbonneaux
30f71a43fc more il description 2016-03-08 11:32:16 -05:00
Quentin Carbonneaux
9b31b1eba2 more il description, pheeew 2016-03-04 14:48:35 -05:00
Quentin Carbonneaux
df151c7440 start il.txt 2016-03-04 10:58:46 -05:00