2011-01-17 18:16:17 -05:00
|
|
|
! Copyright (C) 2008, 2011 Slava Pestov.
|
2008-09-10 23:11:03 -04:00
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
2014-12-13 19:10:21 -05:00
|
|
|
USING: accessors compiler.cfg.instructions.syntax kernel math
|
|
|
|
|
namespaces ;
|
2008-09-15 02:54:48 -04:00
|
|
|
IN: compiler.cfg.instructions
|
2008-09-10 23:11:03 -04:00
|
|
|
|
2009-09-02 07:22:37 -04:00
|
|
|
<<
|
|
|
|
|
SYMBOL: insn-classes
|
|
|
|
|
V{ } clone insn-classes set-global
|
|
|
|
|
>>
|
|
|
|
|
|
2009-07-29 07:50:46 -04:00
|
|
|
: new-insn ( ... class -- insn ) f swap boa ; inline
|
2009-05-29 14:11:34 -04:00
|
|
|
|
2008-10-24 10:17:06 -04:00
|
|
|
TUPLE: insn ;
|
2008-09-10 23:11:03 -04:00
|
|
|
|
2010-05-14 18:18:04 -04:00
|
|
|
TUPLE: vreg-insn < insn ;
|
|
|
|
|
|
2010-07-13 07:40:14 -04:00
|
|
|
TUPLE: flushable-insn < vreg-insn ;
|
|
|
|
|
|
|
|
|
|
TUPLE: foldable-insn < flushable-insn ;
|
2008-10-20 02:56:28 -04:00
|
|
|
|
2010-04-21 03:08:52 -04:00
|
|
|
! Constants
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: load-integer##
|
2010-04-21 03:08:52 -04:00
|
|
|
def: dst/int-rep
|
2010-04-24 04:49:35 -04:00
|
|
|
literal: val ;
|
2008-10-20 02:56:28 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: load-reference##
|
2010-04-19 15:05:55 -04:00
|
|
|
def: dst/tagged-rep
|
2010-04-24 04:49:35 -04:00
|
|
|
literal: obj ;
|
2008-10-20 02:56:28 -04:00
|
|
|
|
2010-07-13 07:40:14 -04:00
|
|
|
! These four are inserted by representation selection
|
2018-08-10 14:04:49 -04:00
|
|
|
FLUSHABLE-INSN: load-tagged##
|
2010-04-19 15:05:55 -04:00
|
|
|
def: dst/tagged-rep
|
2010-04-24 04:49:35 -04:00
|
|
|
literal: val ;
|
2009-09-30 03:18:29 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FLUSHABLE-INSN: load-float##
|
2010-05-07 18:26:00 -04:00
|
|
|
def: dst/float-rep
|
|
|
|
|
literal: val ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FLUSHABLE-INSN: load-double##
|
2010-04-18 22:42:19 -04:00
|
|
|
def: dst/double-rep
|
2010-04-24 04:49:35 -04:00
|
|
|
literal: val ;
|
2010-04-18 22:42:19 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FLUSHABLE-INSN: load-vector##
|
2010-04-30 21:33:42 -04:00
|
|
|
def: dst
|
|
|
|
|
literal: val rep ;
|
|
|
|
|
|
2010-04-21 03:08:52 -04:00
|
|
|
! Stack operations
|
2018-08-10 14:04:49 -04:00
|
|
|
FLUSHABLE-INSN: peek##
|
2010-04-19 15:05:55 -04:00
|
|
|
def: dst/tagged-rep
|
2009-09-02 07:22:37 -04:00
|
|
|
literal: loc ;
|
2008-10-20 02:56:28 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
VREG-INSN: replace##
|
2010-04-19 15:05:55 -04:00
|
|
|
use: src/tagged-rep
|
2009-09-02 07:22:37 -04:00
|
|
|
literal: loc ;
|
2008-09-10 23:11:03 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
INSN: replace-imm##
|
2010-05-01 03:04:31 -04:00
|
|
|
literal: src loc ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
INSN: clear##
|
2015-05-17 01:57:24 -04:00
|
|
|
literal: loc ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
INSN: inc##
|
2015-03-03 17:45:47 -05:00
|
|
|
literal: loc ;
|
2008-10-20 02:56:28 -04:00
|
|
|
|
2009-09-02 07:22:37 -04:00
|
|
|
! Subroutine calls
|
2018-08-10 14:04:49 -04:00
|
|
|
INSN: call##
|
2015-05-16 21:11:32 -04:00
|
|
|
literal: word ;
|
2008-10-20 02:56:28 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
INSN: jump##
|
2009-09-02 07:22:37 -04:00
|
|
|
literal: word ;
|
2008-09-10 23:11:03 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
INSN: prologue## ;
|
2010-05-02 18:48:41 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
INSN: epilogue## ;
|
2010-05-02 18:48:41 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
INSN: return## ;
|
2008-10-07 17:13:29 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
INSN: safepoint## ;
|
2011-10-18 01:43:19 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
INSN: no-tco## ;
|
2009-06-30 22:21:46 -04:00
|
|
|
|
2008-09-10 23:11:03 -04:00
|
|
|
! Jump tables
|
2018-08-10 14:04:49 -04:00
|
|
|
VREG-INSN: dispatch##
|
2010-04-21 03:08:52 -04:00
|
|
|
use: src/int-rep
|
2009-09-02 07:22:37 -04:00
|
|
|
temp: temp/int-rep ;
|
2008-09-10 23:11:03 -04:00
|
|
|
|
2008-10-20 02:56:28 -04:00
|
|
|
! Slot access
|
2018-08-10 14:04:49 -04:00
|
|
|
FLUSHABLE-INSN: slot##
|
2010-04-19 15:05:55 -04:00
|
|
|
def: dst/tagged-rep
|
2010-04-23 20:20:06 -04:00
|
|
|
use: obj/tagged-rep slot/int-rep
|
|
|
|
|
literal: scale tag ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FLUSHABLE-INSN: slot-imm##
|
2010-04-19 15:05:55 -04:00
|
|
|
def: dst/tagged-rep
|
|
|
|
|
use: obj/tagged-rep
|
2009-09-02 07:22:37 -04:00
|
|
|
literal: slot tag ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
VREG-INSN: set-slot##
|
2010-04-23 20:20:06 -04:00
|
|
|
use: src/tagged-rep obj/tagged-rep slot/int-rep
|
|
|
|
|
literal: scale tag ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
VREG-INSN: set-slot-imm##
|
2010-04-19 15:05:55 -04:00
|
|
|
use: src/tagged-rep obj/tagged-rep
|
2009-09-02 07:22:37 -04:00
|
|
|
literal: slot tag ;
|
2008-10-20 02:56:28 -04:00
|
|
|
|
2010-04-21 03:08:52 -04:00
|
|
|
! Register transfers
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: copy##
|
2009-09-03 03:33:07 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2011-01-17 18:16:17 -05:00
|
|
|
! Only used by compiler.cfg.cssa
|
2018-08-10 14:04:49 -04:00
|
|
|
FLUSHABLE-INSN: parallel-copy##
|
2011-01-17 18:16:17 -05:00
|
|
|
literal: values ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: tagged>integer##
|
2010-04-21 03:08:52 -04:00
|
|
|
def: dst/int-rep
|
|
|
|
|
use: src/tagged-rep ;
|
|
|
|
|
|
2008-10-20 02:56:28 -04:00
|
|
|
! Integer arithmetic
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: add##
|
2010-04-21 03:08:52 -04:00
|
|
|
def: dst/int-rep
|
|
|
|
|
use: src1/int-rep src2/int-rep ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: add-imm##
|
2010-04-21 03:08:52 -04:00
|
|
|
def: dst/int-rep
|
|
|
|
|
use: src1/int-rep
|
2010-04-24 04:49:35 -04:00
|
|
|
literal: src2 ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: sub##
|
2010-04-21 03:08:52 -04:00
|
|
|
def: dst/int-rep
|
|
|
|
|
use: src1/int-rep src2/int-rep ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: sub-imm##
|
2010-04-21 03:08:52 -04:00
|
|
|
def: dst/int-rep
|
|
|
|
|
use: src1/int-rep
|
2010-04-24 04:49:35 -04:00
|
|
|
literal: src2 ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: mul##
|
2010-04-21 03:08:52 -04:00
|
|
|
def: dst/int-rep
|
|
|
|
|
use: src1/int-rep src2/int-rep ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: mul-imm##
|
2010-04-21 03:08:52 -04:00
|
|
|
def: dst/int-rep
|
|
|
|
|
use: src1/int-rep
|
2010-04-24 04:49:35 -04:00
|
|
|
literal: src2 ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: and##
|
2010-04-21 03:08:52 -04:00
|
|
|
def: dst/int-rep
|
|
|
|
|
use: src1/int-rep src2/int-rep ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: and-imm##
|
2010-04-21 03:08:52 -04:00
|
|
|
def: dst/int-rep
|
|
|
|
|
use: src1/int-rep
|
2010-04-24 04:49:35 -04:00
|
|
|
literal: src2 ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: or##
|
2010-04-21 03:08:52 -04:00
|
|
|
def: dst/int-rep
|
|
|
|
|
use: src1/int-rep src2/int-rep ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: or-imm##
|
2010-04-21 03:08:52 -04:00
|
|
|
def: dst/int-rep
|
|
|
|
|
use: src1/int-rep
|
2010-04-24 04:49:35 -04:00
|
|
|
literal: src2 ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: xor##
|
2010-04-21 03:08:52 -04:00
|
|
|
def: dst/int-rep
|
|
|
|
|
use: src1/int-rep src2/int-rep ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: xor-imm##
|
2010-04-21 03:08:52 -04:00
|
|
|
def: dst/int-rep
|
|
|
|
|
use: src1/int-rep
|
2010-04-24 04:49:35 -04:00
|
|
|
literal: src2 ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: shl##
|
2010-04-21 03:08:52 -04:00
|
|
|
def: dst/int-rep
|
|
|
|
|
use: src1/int-rep src2/int-rep ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: shl-imm##
|
2010-04-21 03:08:52 -04:00
|
|
|
def: dst/int-rep
|
|
|
|
|
use: src1/int-rep
|
2010-04-24 04:49:35 -04:00
|
|
|
literal: src2 ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: shr##
|
2010-04-21 03:08:52 -04:00
|
|
|
def: dst/int-rep
|
|
|
|
|
use: src1/int-rep src2/int-rep ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: shr-imm##
|
2010-04-21 03:08:52 -04:00
|
|
|
def: dst/int-rep
|
|
|
|
|
use: src1/int-rep
|
2010-04-24 04:49:35 -04:00
|
|
|
literal: src2 ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: sar##
|
2010-04-21 03:08:52 -04:00
|
|
|
def: dst/int-rep
|
|
|
|
|
use: src1/int-rep src2/int-rep ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: sar-imm##
|
2010-04-21 03:08:52 -04:00
|
|
|
def: dst/int-rep
|
|
|
|
|
use: src1/int-rep
|
2010-04-24 04:49:35 -04:00
|
|
|
literal: src2 ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: min##
|
2010-04-21 03:08:52 -04:00
|
|
|
def: dst/int-rep
|
|
|
|
|
use: src1/int-rep src2/int-rep ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: max##
|
2010-04-21 03:08:52 -04:00
|
|
|
def: dst/int-rep
|
|
|
|
|
use: src1/int-rep src2/int-rep ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: not##
|
2010-04-21 03:08:52 -04:00
|
|
|
def: dst/int-rep
|
|
|
|
|
use: src/int-rep ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: neg##
|
2010-04-21 03:08:52 -04:00
|
|
|
def: dst/int-rep
|
|
|
|
|
use: src/int-rep ;
|
2009-09-28 18:31:34 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: log2##
|
2010-04-21 03:08:52 -04:00
|
|
|
def: dst/int-rep
|
|
|
|
|
use: src/int-rep ;
|
2008-10-20 21:40:15 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: bit-count##
|
2010-05-15 16:57:35 -04:00
|
|
|
def: dst/int-rep
|
|
|
|
|
use: src/int-rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: bit-test##
|
2015-06-17 22:11:10 -04:00
|
|
|
def: dst/tagged-rep
|
|
|
|
|
use: src1/int-rep src2/int-rep
|
|
|
|
|
temp: temp/int-rep ;
|
|
|
|
|
|
2008-10-20 02:56:28 -04:00
|
|
|
! Float arithmetic
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: add-float##
|
2009-09-03 21:58:56 -04:00
|
|
|
def: dst/double-rep
|
|
|
|
|
use: src1/double-rep src2/double-rep ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: sub-float##
|
2009-09-03 21:58:56 -04:00
|
|
|
def: dst/double-rep
|
|
|
|
|
use: src1/double-rep src2/double-rep ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: mul-float##
|
2009-09-03 21:58:56 -04:00
|
|
|
def: dst/double-rep
|
|
|
|
|
use: src1/double-rep src2/double-rep ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: div-float##
|
2009-09-03 21:58:56 -04:00
|
|
|
def: dst/double-rep
|
|
|
|
|
use: src1/double-rep src2/double-rep ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: min-float##
|
2009-09-03 21:58:56 -04:00
|
|
|
def: dst/double-rep
|
|
|
|
|
use: src1/double-rep src2/double-rep ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: max-float##
|
2009-09-03 21:58:56 -04:00
|
|
|
def: dst/double-rep
|
|
|
|
|
use: src1/double-rep src2/double-rep ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: sqrt##
|
2009-09-03 21:58:56 -04:00
|
|
|
def: dst/double-rep
|
|
|
|
|
use: src/double-rep ;
|
2008-10-20 02:56:28 -04:00
|
|
|
|
2009-09-03 03:33:07 -04:00
|
|
|
! Single/double float conversion
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: single>double-float##
|
2009-09-03 21:58:56 -04:00
|
|
|
def: dst/double-rep
|
|
|
|
|
use: src/float-rep ;
|
2009-09-03 03:33:07 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: double>single-float##
|
2009-09-03 21:58:56 -04:00
|
|
|
def: dst/float-rep
|
|
|
|
|
use: src/double-rep ;
|
2009-09-03 03:33:07 -04:00
|
|
|
|
2008-10-20 02:56:28 -04:00
|
|
|
! Float/integer conversion
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: float>integer##
|
2010-04-21 03:08:52 -04:00
|
|
|
def: dst/int-rep
|
2009-09-03 21:58:56 -04:00
|
|
|
use: src/double-rep ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: integer>float##
|
2009-09-03 21:58:56 -04:00
|
|
|
def: dst/double-rep
|
2010-04-21 03:08:52 -04:00
|
|
|
use: src/int-rep ;
|
2008-10-20 02:56:28 -04:00
|
|
|
|
2009-09-03 03:33:07 -04:00
|
|
|
! SIMD operations
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: zero-vector##
|
2009-09-28 18:31:34 -04:00
|
|
|
def: dst
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: fill-vector##
|
2009-10-02 21:04:28 -04:00
|
|
|
def: dst
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: gather-vector-2##
|
2009-09-03 03:33:07 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src1/scalar-rep src2/scalar-rep
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: gather-int-vector-2##
|
2010-05-16 02:48:22 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src1/int-rep src2/int-rep
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: gather-vector-4##
|
2009-09-03 03:33:07 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src1/scalar-rep src2/scalar-rep src3/scalar-rep src4/scalar-rep
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: gather-int-vector-4##
|
2010-05-16 02:48:22 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src1/int-rep src2/int-rep src3/int-rep src4/int-rep
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: select-vector##
|
2010-05-16 03:49:12 -04:00
|
|
|
def: dst/int-rep
|
|
|
|
|
use: src
|
|
|
|
|
literal: n rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: shuffle-vector##
|
2009-09-28 18:31:34 -04:00
|
|
|
def: dst
|
2009-10-09 21:46:52 -04:00
|
|
|
use: src shuffle
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: shuffle-vector-halves-imm##
|
2010-05-14 03:15:29 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src1 src2
|
|
|
|
|
literal: shuffle rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: shuffle-vector-imm##
|
2009-10-09 21:46:52 -04:00
|
|
|
def: dst
|
2009-09-28 18:31:34 -04:00
|
|
|
use: src
|
|
|
|
|
literal: shuffle rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: tail>head-vector##
|
2009-10-07 15:09:46 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: merge-vector-head##
|
2009-10-03 22:48:53 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src1 src2
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: merge-vector-tail##
|
2009-10-03 22:48:53 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src1 src2
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: float-pack-vector##
|
2010-06-01 03:34:50 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: signed-pack-vector##
|
2009-10-05 22:01:34 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src1 src2
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: unsigned-pack-vector##
|
2009-10-05 22:01:34 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src1 src2
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: unpack-vector-head##
|
2009-10-05 22:01:34 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: unpack-vector-tail##
|
2009-10-05 22:01:34 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: integer>float-vector##
|
2009-10-05 22:01:34 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: float>integer-vector##
|
2009-10-05 22:01:34 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: compare-vector##
|
2009-10-01 15:31:37 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src1 src2
|
|
|
|
|
literal: rep cc ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: move-vector-mask##
|
2011-11-12 01:47:54 -05:00
|
|
|
def: dst/int-rep
|
|
|
|
|
use: src
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: test-vector##
|
2010-04-19 15:05:55 -04:00
|
|
|
def: dst/tagged-rep
|
2009-10-01 20:53:30 -04:00
|
|
|
use: src1
|
|
|
|
|
temp: temp/int-rep
|
|
|
|
|
literal: rep vcc ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
VREG-INSN: test-vector-branch##
|
2009-10-01 20:53:30 -04:00
|
|
|
use: src1
|
|
|
|
|
temp: temp/int-rep
|
|
|
|
|
literal: rep vcc ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: add-vector##
|
2009-09-03 03:33:07 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src1 src2
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: saturated-add-vector##
|
2009-09-03 03:33:07 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src1 src2
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: add-sub-vector##
|
2009-09-20 18:43:16 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src1 src2
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: sub-vector##
|
2009-09-21 00:16:02 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src1 src2
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: saturated-sub-vector##
|
2009-09-21 00:16:02 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src1 src2
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: mul-vector##
|
2009-09-03 03:33:07 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src1 src2
|
|
|
|
|
literal: rep ;
|
2009-09-21 00:16:02 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: mul-high-vector##
|
2009-12-05 17:52:18 -05:00
|
|
|
def: dst
|
|
|
|
|
use: src1 src2
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: mul-horizontal-add-vector##
|
2009-12-05 17:52:18 -05:00
|
|
|
def: dst
|
|
|
|
|
use: src1 src2
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: saturated-mul-vector##
|
2009-09-21 00:16:02 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src1 src2
|
|
|
|
|
literal: rep ;
|
2009-09-03 03:33:07 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: div-vector##
|
2009-09-03 03:33:07 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src1 src2
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: min-vector##
|
2009-09-03 03:33:07 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src1 src2
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: max-vector##
|
2009-09-03 03:33:07 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src1 src2
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: avg-vector##
|
2009-12-05 17:52:18 -05:00
|
|
|
def: dst
|
|
|
|
|
use: src1 src2
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: dot-vector##
|
2009-09-28 18:31:34 -04:00
|
|
|
def: dst/scalar-rep
|
|
|
|
|
use: src1 src2
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: sad-vector##
|
2009-12-05 17:52:18 -05:00
|
|
|
def: dst
|
|
|
|
|
use: src1 src2
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: horizontal-add-vector##
|
2009-11-04 13:18:01 -05:00
|
|
|
def: dst
|
|
|
|
|
use: src1 src2
|
2009-09-23 03:46:54 -04:00
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: horizontal-sub-vector##
|
2009-11-04 13:18:01 -05:00
|
|
|
def: dst
|
|
|
|
|
use: src1 src2
|
2009-09-28 03:17:46 -04:00
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: horizontal-shl-vector-imm##
|
2009-09-28 03:17:46 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src1
|
|
|
|
|
literal: src2 rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: horizontal-shr-vector-imm##
|
2009-09-28 03:17:46 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src1
|
|
|
|
|
literal: src2 rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: abs-vector##
|
2009-09-02 07:22:37 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: sqrt-vector##
|
2009-09-23 03:46:54 -04:00
|
|
|
def: dst
|
2009-09-03 03:33:07 -04:00
|
|
|
use: src
|
|
|
|
|
literal: rep ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: and-vector##
|
2009-09-23 03:46:54 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src1 src2
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: andn-vector##
|
2009-09-28 03:17:46 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src1 src2
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: or-vector##
|
2009-09-23 03:46:54 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src1 src2
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: xor-vector##
|
2009-09-23 03:46:54 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src1 src2
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: not-vector##
|
2009-10-02 21:04:28 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: shl-vector-imm##
|
2009-10-30 01:41:19 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src1
|
|
|
|
|
literal: src2 rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: shr-vector-imm##
|
2009-10-30 01:41:19 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src1
|
|
|
|
|
literal: src2 rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: shl-vector##
|
2009-09-24 04:32:39 -04:00
|
|
|
def: dst
|
2009-09-30 21:04:37 -04:00
|
|
|
use: src1 src2/int-scalar-rep
|
2009-09-24 04:32:39 -04:00
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: shr-vector##
|
2009-09-24 04:32:39 -04:00
|
|
|
def: dst
|
2009-09-30 21:04:37 -04:00
|
|
|
use: src1 src2/int-scalar-rep
|
2009-09-24 04:32:39 -04:00
|
|
|
literal: rep ;
|
|
|
|
|
|
2009-09-29 05:46:38 -04:00
|
|
|
! Scalar/vector conversion
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: scalar>integer##
|
2010-04-21 03:08:52 -04:00
|
|
|
def: dst/int-rep
|
2009-09-24 04:32:39 -04:00
|
|
|
use: src
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: integer>scalar##
|
2009-09-24 04:32:39 -04:00
|
|
|
def: dst
|
2010-04-21 03:08:52 -04:00
|
|
|
use: src/int-rep
|
2009-09-24 04:32:39 -04:00
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: vector>scalar##
|
2009-09-29 05:46:38 -04:00
|
|
|
def: dst/scalar-rep
|
|
|
|
|
use: src
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: scalar>vector##
|
2009-09-29 05:46:38 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src/scalar-rep
|
|
|
|
|
literal: rep ;
|
|
|
|
|
|
2009-09-03 03:33:07 -04:00
|
|
|
! Boxing and unboxing aliens
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: box-alien##
|
2010-04-19 15:05:55 -04:00
|
|
|
def: dst/tagged-rep
|
2010-04-21 03:08:52 -04:00
|
|
|
use: src/int-rep
|
2009-09-02 07:22:37 -04:00
|
|
|
temp: temp/int-rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: box-displaced-alien##
|
2010-04-19 15:05:55 -04:00
|
|
|
def: dst/tagged-rep
|
2010-04-22 18:02:56 -04:00
|
|
|
use: displacement/int-rep base/tagged-rep
|
2009-11-03 03:42:27 -05:00
|
|
|
temp: temp/int-rep
|
2009-09-02 07:22:37 -04:00
|
|
|
literal: base-class ;
|
2008-10-20 06:55:20 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: unbox-any-c-ptr##
|
2010-04-21 03:08:52 -04:00
|
|
|
def: dst/int-rep
|
2010-04-19 15:05:55 -04:00
|
|
|
use: src/tagged-rep ;
|
2009-09-03 22:22:43 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: unbox-alien##
|
2010-04-21 03:08:52 -04:00
|
|
|
def: dst/int-rep
|
2010-04-19 15:05:55 -04:00
|
|
|
use: src/tagged-rep ;
|
2008-10-20 06:55:20 -04:00
|
|
|
|
2010-07-19 10:09:28 -04:00
|
|
|
! Zero-extending and sign-extending integers
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: convert-integer##
|
2010-07-19 10:09:28 -04:00
|
|
|
def: dst/int-rep
|
|
|
|
|
use: src/int-rep
|
|
|
|
|
literal: c-type ;
|
|
|
|
|
|
2010-04-23 18:42:09 -04:00
|
|
|
! Raw memory accessors
|
2018-08-10 14:04:49 -04:00
|
|
|
FLUSHABLE-INSN: load-memory##
|
2010-04-24 00:13:44 -04:00
|
|
|
def: dst
|
|
|
|
|
use: base/int-rep displacement/int-rep
|
|
|
|
|
literal: scale offset rep c-type ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FLUSHABLE-INSN: load-memory-imm##
|
2009-09-03 03:33:07 -04:00
|
|
|
def: dst
|
2010-04-23 18:42:09 -04:00
|
|
|
use: base/int-rep
|
|
|
|
|
literal: offset rep c-type ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
VREG-INSN: store-memory##
|
2010-04-24 00:13:44 -04:00
|
|
|
use: src base/int-rep displacement/int-rep
|
|
|
|
|
literal: scale offset rep c-type ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
VREG-INSN: store-memory-imm##
|
2010-04-23 18:42:09 -04:00
|
|
|
use: src base/int-rep
|
|
|
|
|
literal: offset rep c-type ;
|
2009-09-03 03:33:07 -04:00
|
|
|
|
2009-09-02 07:22:37 -04:00
|
|
|
! Memory allocation
|
2018-08-10 14:04:49 -04:00
|
|
|
FLUSHABLE-INSN: allot##
|
2010-04-19 15:05:55 -04:00
|
|
|
def: dst/tagged-rep
|
2011-10-24 22:33:09 -04:00
|
|
|
literal: size class-of
|
2009-09-02 07:22:37 -04:00
|
|
|
temp: temp/int-rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
VREG-INSN: write-barrier##
|
2010-04-21 03:08:52 -04:00
|
|
|
use: src/tagged-rep slot/int-rep
|
2010-04-23 20:20:06 -04:00
|
|
|
literal: scale tag
|
2009-10-14 03:06:01 -04:00
|
|
|
temp: temp1/int-rep temp2/int-rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
VREG-INSN: write-barrier-imm##
|
2010-04-19 15:05:55 -04:00
|
|
|
use: src/tagged-rep
|
2010-04-23 20:20:06 -04:00
|
|
|
literal: slot tag
|
2009-10-14 03:06:01 -04:00
|
|
|
temp: temp1/int-rep temp2/int-rep ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FLUSHABLE-INSN: alien-global##
|
2010-04-21 03:08:52 -04:00
|
|
|
def: dst/int-rep
|
2009-09-02 07:22:37 -04:00
|
|
|
literal: symbol library ;
|
2008-12-06 10:16:29 -05:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FLUSHABLE-INSN: vm-field##
|
2010-04-19 15:05:55 -04:00
|
|
|
def: dst/tagged-rep
|
2010-04-01 20:06:18 -04:00
|
|
|
literal: offset ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
VREG-INSN: set-vm-field##
|
2010-04-22 18:02:56 -04:00
|
|
|
use: src/tagged-rep
|
2010-04-01 20:06:18 -04:00
|
|
|
literal: offset ;
|
2010-03-26 23:11:05 -04:00
|
|
|
|
2008-09-10 23:11:03 -04:00
|
|
|
! FFI
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: unbox##
|
2010-05-11 19:11:31 -04:00
|
|
|
def: dst
|
|
|
|
|
use: src/tagged-rep
|
|
|
|
|
literal: unboxer rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: unbox-long-long##
|
2010-07-15 19:49:29 -04:00
|
|
|
def: dst1/int-rep dst2/int-rep
|
|
|
|
|
use: src/tagged-rep
|
2010-05-19 01:07:22 -04:00
|
|
|
literal: unboxer ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FLUSHABLE-INSN: local-allot##
|
2010-05-19 00:33:15 -04:00
|
|
|
def: dst/int-rep
|
2010-05-22 01:25:10 -04:00
|
|
|
literal: size align offset ;
|
2010-05-11 19:11:31 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: box##
|
2010-05-09 23:25:46 -04:00
|
|
|
def: dst/tagged-rep
|
2010-05-16 03:43:02 -04:00
|
|
|
use: src
|
2010-06-13 17:36:08 -04:00
|
|
|
literal: boxer rep gc-map ;
|
2010-05-09 21:36:52 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: box-long-long##
|
2010-05-09 23:25:46 -04:00
|
|
|
def: dst/tagged-rep
|
2010-05-16 03:43:02 -04:00
|
|
|
use: src1/int-rep src2/int-rep
|
2010-06-13 17:36:08 -04:00
|
|
|
literal: boxer gc-map ;
|
2010-05-09 21:36:52 -04:00
|
|
|
|
2010-07-13 07:40:14 -04:00
|
|
|
! Alien call inputs and outputs are arrays of triples with shape
|
|
|
|
|
! { vreg rep stack#/reg }
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
VREG-INSN: alien-invoke##
|
2016-08-08 05:03:20 -04:00
|
|
|
literal: varargs? reg-inputs stack-inputs reg-outputs dead-outputs cleanup stack-size symbols dll gc-map ;
|
2010-05-09 21:36:52 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
VREG-INSN: alien-indirect##
|
2010-06-13 17:36:08 -04:00
|
|
|
use: src/int-rep
|
2016-08-08 05:03:20 -04:00
|
|
|
literal: varargs? reg-inputs stack-inputs reg-outputs dead-outputs cleanup stack-size gc-map ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
VREG-INSN: alien-assembly##
|
2016-08-08 05:03:20 -04:00
|
|
|
literal: varargs? reg-inputs stack-inputs reg-outputs dead-outputs cleanup stack-size quot ;
|
2010-05-09 21:36:52 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
VREG-INSN: callback-inputs##
|
2010-07-13 07:40:14 -04:00
|
|
|
literal: reg-outputs stack-outputs ;
|
2010-01-06 23:39:22 -05:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
VREG-INSN: callback-outputs##
|
2010-07-13 07:40:14 -04:00
|
|
|
literal: reg-inputs ;
|
2010-05-09 21:36:52 -04:00
|
|
|
|
2010-05-02 18:48:41 -04:00
|
|
|
! Control flow
|
2018-08-10 14:04:49 -04:00
|
|
|
FLUSHABLE-INSN: phi##
|
2009-09-02 07:22:37 -04:00
|
|
|
def: dst
|
|
|
|
|
literal: inputs ;
|
2009-05-21 17:49:28 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
INSN: branch## ;
|
2010-05-02 18:48:41 -04:00
|
|
|
|
2010-04-22 04:21:23 -04:00
|
|
|
! Tagged conditionals
|
2018-08-10 14:04:49 -04:00
|
|
|
VREG-INSN: compare-branch##
|
2010-04-19 15:05:55 -04:00
|
|
|
use: src1/tagged-rep src2/tagged-rep
|
2009-09-02 07:22:37 -04:00
|
|
|
literal: cc ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
VREG-INSN: compare-imm-branch##
|
2010-04-19 15:05:55 -04:00
|
|
|
use: src1/tagged-rep
|
2010-04-24 04:49:35 -04:00
|
|
|
literal: src2 cc ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: compare##
|
2010-04-19 15:05:55 -04:00
|
|
|
def: dst/tagged-rep
|
|
|
|
|
use: src1/tagged-rep src2/tagged-rep
|
2009-09-02 07:22:37 -04:00
|
|
|
literal: cc
|
|
|
|
|
temp: temp/int-rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: compare-imm##
|
2010-04-19 15:05:55 -04:00
|
|
|
def: dst/tagged-rep
|
|
|
|
|
use: src1/tagged-rep
|
2010-04-24 04:49:35 -04:00
|
|
|
literal: src2 cc
|
2010-04-22 04:21:23 -04:00
|
|
|
temp: temp/int-rep ;
|
|
|
|
|
|
|
|
|
|
! Integer conditionals
|
2018-08-10 14:04:49 -04:00
|
|
|
VREG-INSN: compare-integer-branch##
|
2010-04-22 04:21:23 -04:00
|
|
|
use: src1/int-rep src2/int-rep
|
|
|
|
|
literal: cc ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
VREG-INSN: compare-integer-imm-branch##
|
2010-04-22 04:21:23 -04:00
|
|
|
use: src1/int-rep
|
2010-04-24 04:49:35 -04:00
|
|
|
literal: src2 cc ;
|
2010-04-22 04:21:23 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
VREG-INSN: test-branch##
|
2010-05-14 08:14:22 -04:00
|
|
|
use: src1/int-rep src2/int-rep
|
|
|
|
|
literal: cc ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
VREG-INSN: test-imm-branch##
|
2010-05-14 08:14:22 -04:00
|
|
|
use: src1/int-rep
|
|
|
|
|
literal: src2 cc ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: compare-integer##
|
2010-04-22 04:21:23 -04:00
|
|
|
def: dst/tagged-rep
|
|
|
|
|
use: src1/int-rep src2/int-rep
|
2009-09-02 07:22:37 -04:00
|
|
|
literal: cc
|
|
|
|
|
temp: temp/int-rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: compare-integer-imm##
|
2010-04-22 04:21:23 -04:00
|
|
|
def: dst/tagged-rep
|
|
|
|
|
use: src1/int-rep
|
2010-04-24 04:49:35 -04:00
|
|
|
literal: src2 cc
|
2010-04-22 04:21:23 -04:00
|
|
|
temp: temp/int-rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: test##
|
2010-05-14 08:14:22 -04:00
|
|
|
def: dst/tagged-rep
|
|
|
|
|
use: src1/int-rep src2/int-rep
|
|
|
|
|
literal: cc
|
|
|
|
|
temp: temp/int-rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: test-imm##
|
2010-05-14 08:14:22 -04:00
|
|
|
def: dst/tagged-rep
|
|
|
|
|
use: src1/int-rep
|
|
|
|
|
literal: src2 cc
|
|
|
|
|
temp: temp/int-rep ;
|
|
|
|
|
|
2010-04-22 04:21:23 -04:00
|
|
|
! Float conditionals
|
2018-08-10 14:04:49 -04:00
|
|
|
VREG-INSN: compare-float-ordered-branch##
|
2009-09-03 21:58:56 -04:00
|
|
|
use: src1/double-rep src2/double-rep
|
2009-09-02 07:22:37 -04:00
|
|
|
literal: cc ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
VREG-INSN: compare-float-unordered-branch##
|
2009-09-08 18:04:26 -04:00
|
|
|
use: src1/double-rep src2/double-rep
|
|
|
|
|
literal: cc ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: compare-float-ordered##
|
2010-04-19 15:05:55 -04:00
|
|
|
def: dst/tagged-rep
|
2009-09-08 18:04:26 -04:00
|
|
|
use: src1/double-rep src2/double-rep
|
|
|
|
|
literal: cc
|
|
|
|
|
temp: temp/int-rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
FOLDABLE-INSN: compare-float-unordered##
|
2010-04-19 15:05:55 -04:00
|
|
|
def: dst/tagged-rep
|
2009-09-03 21:58:56 -04:00
|
|
|
use: src1/double-rep src2/double-rep
|
2009-09-02 07:22:37 -04:00
|
|
|
literal: cc
|
|
|
|
|
temp: temp/int-rep ;
|
2008-10-20 02:56:28 -04:00
|
|
|
|
2009-09-02 07:22:37 -04:00
|
|
|
! Overflowing arithmetic
|
2018-08-10 14:04:49 -04:00
|
|
|
VREG-INSN: fixnum-add##
|
2010-04-19 15:05:55 -04:00
|
|
|
def: dst/tagged-rep
|
2010-04-27 10:51:00 -04:00
|
|
|
use: src1/tagged-rep src2/tagged-rep
|
|
|
|
|
literal: cc ;
|
2008-10-20 06:55:20 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
VREG-INSN: fixnum-sub##
|
2010-04-19 15:05:55 -04:00
|
|
|
def: dst/tagged-rep
|
2010-04-27 10:51:00 -04:00
|
|
|
use: src1/tagged-rep src2/tagged-rep
|
|
|
|
|
literal: cc ;
|
2008-09-11 03:05:22 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
VREG-INSN: fixnum-mul##
|
2010-04-19 15:05:55 -04:00
|
|
|
def: dst/tagged-rep
|
2010-04-27 10:51:00 -04:00
|
|
|
use: src1/tagged-rep src2/int-rep
|
|
|
|
|
literal: cc ;
|
2009-05-31 19:21:11 -04:00
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
VREG-INSN: save-context##
|
2009-12-21 21:42:49 -05:00
|
|
|
temp: temp1/int-rep temp2/int-rep ;
|
2009-09-08 22:50:55 -04:00
|
|
|
|
2010-04-27 10:51:00 -04:00
|
|
|
! GC checks
|
2018-08-10 14:04:49 -04:00
|
|
|
VREG-INSN: check-nursery-branch##
|
2010-04-27 10:51:00 -04:00
|
|
|
literal: size cc
|
|
|
|
|
temp: temp1/int-rep temp2/int-rep ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
INSN: call-gc##
|
2010-07-13 07:40:14 -04:00
|
|
|
literal: gc-map ;
|
2010-04-27 10:51:00 -04:00
|
|
|
|
2010-04-28 03:35:46 -04:00
|
|
|
! Spills and reloads, inserted by register allocator
|
|
|
|
|
TUPLE: spill-slot { n integer } ;
|
|
|
|
|
C: <spill-slot> spill-slot
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
VREG-INSN: spill##
|
2010-04-28 03:35:46 -04:00
|
|
|
use: src
|
|
|
|
|
literal: rep dst ;
|
|
|
|
|
|
2018-08-10 14:04:49 -04:00
|
|
|
VREG-INSN: reload##
|
2010-04-28 03:35:46 -04:00
|
|
|
def: dst
|
|
|
|
|
literal: rep src ;
|
|
|
|
|
|
2015-07-23 04:08:10 -04:00
|
|
|
UNION: allocation-insn
|
2018-08-10 14:04:49 -04:00
|
|
|
allot##
|
|
|
|
|
box-alien##
|
|
|
|
|
box-displaced-alien## ;
|
2009-09-02 07:22:37 -04:00
|
|
|
|
2010-04-27 10:51:00 -04:00
|
|
|
UNION: conditional-branch-insn
|
2018-08-10 14:04:49 -04:00
|
|
|
compare-branch##
|
|
|
|
|
compare-imm-branch##
|
|
|
|
|
compare-integer-branch##
|
|
|
|
|
compare-integer-imm-branch##
|
|
|
|
|
test-branch##
|
|
|
|
|
test-imm-branch##
|
|
|
|
|
compare-float-ordered-branch##
|
|
|
|
|
compare-float-unordered-branch##
|
|
|
|
|
test-vector-branch##
|
|
|
|
|
check-nursery-branch##
|
|
|
|
|
fixnum-add##
|
|
|
|
|
fixnum-sub##
|
|
|
|
|
fixnum-mul## ;
|
2010-04-27 10:51:00 -04:00
|
|
|
|
2009-09-02 07:22:37 -04:00
|
|
|
! For alias analysis
|
2018-08-10 14:04:49 -04:00
|
|
|
UNION: read-insn slot## slot-imm## vm-field## alien-global## ;
|
|
|
|
|
UNION: write-insn set-slot## set-slot-imm## set-vm-field## ;
|
2009-07-16 03:17:58 -04:00
|
|
|
|
2014-12-08 16:44:02 -05:00
|
|
|
UNION: alien-call-insn
|
2018-08-10 14:04:49 -04:00
|
|
|
alien-assembly##
|
|
|
|
|
alien-indirect##
|
|
|
|
|
alien-invoke## ;
|
2010-09-27 01:20:50 -04:00
|
|
|
|
2010-06-13 17:36:08 -04:00
|
|
|
UNION: gc-map-insn
|
2018-08-10 14:04:49 -04:00
|
|
|
call-gc##
|
|
|
|
|
box##
|
|
|
|
|
box-long-long##
|
|
|
|
|
alien-indirect##
|
|
|
|
|
alien-invoke## ;
|
2010-06-13 17:36:08 -04:00
|
|
|
|
|
|
|
|
M: gc-map-insn clone call-next-method [ clone ] change-gc-map ;
|
|
|
|
|
|
2016-09-11 14:34:44 -04:00
|
|
|
TUPLE: gc-map gc-roots derived-roots ;
|
2010-06-13 17:36:08 -04:00
|
|
|
|
|
|
|
|
: <gc-map> ( -- gc-map ) gc-map new ;
|
|
|
|
|
|
2009-07-27 23:29:17 -04:00
|
|
|
UNION: def-is-use-insn
|
2018-08-10 14:04:49 -04:00
|
|
|
box-alien##
|
|
|
|
|
box-displaced-alien##
|
|
|
|
|
unbox-any-c-ptr## ;
|