ISLE standard prelude: Additional types and helpers

In preparing to move the s390x back-end to ISLE, I noticed a few
missing pieces in the common prelude code.  This patch:

- Defines the reference types $R32 / $R64.
- Provides a trap_code_bad_conversion_to_integer helper.
- Provides an avoid_div_traps helper.  This requires passing the
  generic flags in addition to the ISA-specifc flags into the
  ISLE lowering context.
This commit is contained in:
Ulrich Weigand
2022-01-20 17:23:31 +01:00
parent 9321a9db88
commit be60a19623
10 changed files with 66 additions and 29 deletions

View File

@@ -132,6 +132,9 @@
(extern const $I64 Type)
(extern const $I128 Type)
(extern const $R32 Type)
(extern const $R64 Type)
(extern const $F32 Type)
(extern const $F64 Type)
@@ -338,3 +341,12 @@
(decl trap_code_integer_overflow () TrapCode)
(extern constructor trap_code_integer_overflow trap_code_integer_overflow)
(decl trap_code_bad_conversion_to_integer () TrapCode)
(extern constructor trap_code_bad_conversion_to_integer trap_code_bad_conversion_to_integer)
;;;; Helpers for accessing compilation flags ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(decl avoid_div_traps () Type)
(extern extractor avoid_div_traps avoid_div_traps)