From f5de42001df2e61233c7ec7bbbd014bbaeaee242 Mon Sep 17 00:00:00 2001 From: erifan01 Date: Fri, 26 Jan 2018 10:18:50 +0000 Subject: cmd/asm: add arm64 instructions for math optimization Add arm64 HW instructions FMADDD, FMADDS, FMSUBD, FMSUBS, FNMADDD, FNMADDS, FNMSUBD, FNMSUBS, VFMLA, VFMLS, VMOV (element) for math optimization. Add check on register element index and test cases. Change-Id: Ice07c50b1a02d488ad2cde2a4e8aea93f3e3afff Reviewed-on: https://go-review.googlesource.com/90876 Reviewed-by: Cherry Zhang --- src/cmd/internal/obj/arm64/doc.go | 54 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) (limited to 'src/cmd/internal/obj/arm64/doc.go') diff --git a/src/cmd/internal/obj/arm64/doc.go b/src/cmd/internal/obj/arm64/doc.go index 3d65541fd2..a808d4c3ad 100644 --- a/src/cmd/internal/obj/arm64/doc.go +++ b/src/cmd/internal/obj/arm64/doc.go @@ -22,6 +22,46 @@ Go Assembly for ARM64 Reference Manual 2. Alphabetical list of float-point instructions // TODO + FMADDD: 64-bit floating-point fused Multiply-Add + FMADDD , , , + Multiplies the values of and , + adds the product to , and writes the result to . + + FMADDS: 32-bit floating-point fused Multiply-Add + FMADDS , , , + Multiplies the values of and , + adds the product to , and writes the result to . + + FMSUBD: 64-bit floating-point fused Multiply-Subtract + FMSUBD , , , + Multiplies the values of and , negates the product, + adds the product to , and writes the result to . + + FMSUBS: 32-bit floating-point fused Multiply-Subtract + FMSUBS , , , + Multiplies the values of and , negates the product, + adds the product to , and writes the result to . + + FNMADDD: 64-bit floating-point negated fused Multiply-Add + FNMADDD , , , + Multiplies the values of and , negates the product, + subtracts the value of , and writes the result to . + + FNMADDS: 32-bit floating-point negated fused Multiply-Add + FNMADDS , , , + Multiplies the values of and , negates the product, + subtracts the value of , and writes the result to . + + FNMSUBD: 64-bit floating-point negated fused Multiply-Subtract + FNMSUBD , , , + Multiplies the values of and , + subtracts the value of , and writes the result to . + + FNMSUBS: 32-bit floating-point negated fused Multiply-Subtract + FNMSUBS , , , + Multiplies the values of and , + subtracts the value of , and writes the result to . + 3. Alphabetical list of SIMD instructions VADD: Add (scalar) VADD , , @@ -65,6 +105,16 @@ Go Assembly for ARM64 Reference Manual Is an arrangement specifier and can have the following values: B8, B16 + VFMLA: Floating-point fused Multiply-Add to accumulator (vector) + VFMLA ., ., . + Is an arrangement specifier and can have the following values: + S2, S4, D2 + + VFMLS: Floating-point fused Multiply-Subtract from accumulator (vector) + VFMLS ., ., . + Is an arrangement specifier and can have the following values: + S2, S4, D2 + VLD1: Load multiple single-element structures VLD1 (Rn), [., . ...] // no offset VLD1.P imm(Rn), [., . ...] // immediate offset variant @@ -96,6 +146,10 @@ Go Assembly for ARM64 Reference Manual Is an element size specifier and can have the following values: B, H, S, D + VMOV .[index], .[index] // Move vector element to another vector element. + Is an element size specifier and can have the following values: + B, H, S, D + VMOVI: Move Immediate (vector). VMOVI $imm8, . is an arrangement specifier and can have the following values: -- cgit v1.3-5-g9baa