Move 'as' precedence up to just above relational; support indexing str and vec by all integral types. Closes #94.
This commit is contained in:
parent
718c0b5963
commit
29987b56e1
6 changed files with 67 additions and 37 deletions
|
|
@ -1936,15 +1936,20 @@ let zero (dst:Il.cell) (count:Il.operand) : Asm.frag =
|
|||
;;
|
||||
|
||||
let mov (signed:bool) (dst:Il.cell) (src:Il.operand) : Asm.frag =
|
||||
if is_ty8 (Il.cell_scalar_ty dst) || is_ty8 (Il.operand_scalar_ty src)
|
||||
if is_ty8 (Il.cell_scalar_ty dst)
|
||||
then
|
||||
begin
|
||||
(match dst with
|
||||
Il.Reg (Il.Hreg r, _)
|
||||
-> assert (is_ok_r8 r) | _ -> ());
|
||||
(match src with
|
||||
Il.Cell (Il.Reg (Il.Hreg r, _))
|
||||
-> assert (is_ok_r8 r) | _ -> ());
|
||||
match dst with
|
||||
Il.Reg (Il.Hreg r, _) -> assert (is_ok_r8 r)
|
||||
| _ -> ()
|
||||
end;
|
||||
|
||||
if is_ty8 (Il.operand_scalar_ty src)
|
||||
then
|
||||
begin
|
||||
match src with
|
||||
Il.Cell (Il.Reg (Il.Hreg r, _)) -> assert (is_ok_r8 r)
|
||||
| _ -> ()
|
||||
end;
|
||||
|
||||
match (signed, dst, src) with
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue