From 012a60193df5b708b462e62677319db682d1c107 Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Thu, 6 Jul 2023 17:16:22 -0700 Subject: [PATCH] convert links to footnotes --- .../sv/int_fp_mv/cvt_fp_to_int_overview.mdwn | 57 ++++++++++++------- 1 file changed, 36 insertions(+), 21 deletions(-) diff --git a/openpower/sv/int_fp_mv/cvt_fp_to_int_overview.mdwn b/openpower/sv/int_fp_mv/cvt_fp_to_int_overview.mdwn index 9f1d8fc7f..6512afed9 100644 --- a/openpower/sv/int_fp_mv/cvt_fp_to_int_overview.mdwn +++ b/openpower/sv/int_fp_mv/cvt_fp_to_int_overview.mdwn @@ -12,29 +12,44 @@ modes supported by the `cffpr` instruction are as follows: as well as commonly used floating-point to integer conversions on x86. * S-Type:
- Used for WebAssembly's - [`trunc_sat_u`](https://webassembly.github.io/spec/core/exec/numerics.html#op-trunc-sat-u) - and - [`trunc_sat_s`](https://webassembly.github.io/spec/core/exec/numerics.html#op-trunc-sat-s) - instructions, as well as several notable programming languages: - - * Java's conversion from - [`float`/`double` to `long`/`int`](https://docs.oracle.com/javase/specs/jls/se16/html/jls-5.html#jls-5.1.3) - * Rust's [`as` operator](https://doc.rust-lang.org/1.70.0/reference/expressions/operator-expr.html#numeric-cast) - * LLVM's [`llvm.fptosi.sat`](https://llvm.org/docs/LangRef.html#llvm-fptosi-sat-intrinsic) and - [`llvm.fptoui.sat`](https://llvm.org/docs/LangRef.html#llvm-fptoui-sat-intrinsic) intrinsics - * SPIR-V's OpenCL dialect's - [`OpConvertFToU`](https://www.khronos.org/registry/spir-v/specs/unified1/SPIRV.html#OpConvertFToU) and - [`OpConvertFToS`](https://www.khronos.org/registry/spir-v/specs/unified1/SPIRV.html#OpConvertFToS) - instructions when decorated with - [the `SaturatedConversion` decorator](https://www.khronos.org/registry/spir-v/specs/unified1/SPIRV.html#_a_id_decoration_a_decoration). + Used for WebAssembly's `trunc_sat_u`[^trunc_sat_u] and + `trunc_sat_s`[^trunc_sat_s] instructions, as well as several notable + programming languages: + + * Java's conversion from `float`/`double` to `long`/`int`[^java_fp_to_int] + * Rust's `as` operator[^rust_as_operator] + * LLVM's `llvm.fptosi.sat`[^llvm_fptosi_sat] and + `llvm.fptoui.sat`[^llvm_fptoui_sat] intrinsics + * SPIR-V's OpenCL dialect's `OpConvertFToU`[^SPIRV_OpConvertFToU] and + `OpConvertFToS`[^SPIRV_OpConvertFToS] instructions when decorated with + the `SaturatedConversion`[^SPIRV_SaturatedConversion] decorator. * E-Type:
- Used for - [ECMAScript's `ToInt32` abstract operation](https://262.ecma-international.org/14.0/#sec-toint32). - Also implemented in ARMv8.3A as the `FJCVTZS` - instruction. - + Used for ECMAScript's `ToInt32` abstract operation[^ECMAScript_ToInt32]. + Also implemented in ARMv8.3A as the `FJCVTZS` instruction[^ARM_FJCVTZS]. + +[^trunc_sat_u]: WASM's `trunc_sat_u`: + +[^trunc_sat_s]: WASM's `trunc_sat_s`: + +[^java_fp_to_int]: Java `float`/`double` to `long`/`int` conversion: + +[^rust_as_operator]: Rust's `as` operator: + +[^llvm_fptosi_sat]: LLVM's `llvm.fptosi.sat` intrinsic: + +[^llvm_fptoui_sat]: LLVM's `llvm.fptoui.sat` intrinsic: + +[^SPIRV_OpConvertFToU]: SPIR-V's `OpConvertFToU` instruction: + +[^SPIRV_OpConvertFToS]: SPIR-V's `OpConvertFToS` instruction: + +[^SPIRV_SaturatedConversion]: SPIR-V's `SaturatedConversion` decorator:
+ +[^ECMAScript_ToInt32]: ECMAScript's `ToInt32` abstract operation: + +[^ARM_FJCVTZS]: ARM's `FJCVTZS` instruction: + ### Floating-point to Integer Conversion Semantics Summary -- 2.30.2