pclmulqdq

package
v0.0.0-...-3878f85 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2017 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

THESE PACKAGES ARE FOR DEMONSTRATION PURPOSES ONLY!

THEY DO NOT NOT CONTAIN WORKING INTRINSICS!

See https://github.com/klauspost/intrinsics

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clmulepi64Si128

func Clmulepi64Si128(a x86.M128i, b x86.M128i, imm8 byte) (dst x86.M128i)

Clmulepi64Si128: Perform a carry-less multiplication of two 64-bit integers, selected from 'a' and 'b' according to 'imm8', and store the results in 'dst'.

IF (imm8[0] = 0)
	TEMP1 := a[63:0];
ELSE
	TEMP1 := a[127:64];
FI
IF (imm8[4] = 0)
	TEMP2 := b[63:0];
ELSE
	TEMP2 := b[127:64];
FI

FOR i := 0 to 63
	TEMP[i] := (TEMP1[0] and TEMP2[i]);
	FOR j := 1 to i
		TEMP [i] := TEMP [i] XOR (TEMP1[j] AND TEMP2[i-j])
	ENDFOR
	dst[i] := TEMP[i];
ENDFOR
FOR i := 64 to 127
	TEMP [i] := 0;
	FOR j := (i - 63) to 63
		TEMP [i] := TEMP [i] XOR (TEMP1[j] AND TEMP2[i-j])
	ENDFOR
	dst[i] := TEMP[i];
ENDFOR
dst[127] := 0

Instruction: 'PCLMULQDQ'. Intrinsic: '_mm_clmulepi64_si128'. Requires PCLMULQDQ.

FIXME: Requires compiler support (has immediate)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL