File: crc.s

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (52 lines) | stat: -rw-r--r-- 1,647 bytes parent folder | download | duplicates (25)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// RUN: llvm-mc -triple aarch64-- -mattr=+crc %s 2>&1 |\
// RUN:   FileCheck %s --check-prefix=CRC

// RUN: llvm-mc -triple aarch64-- -mcpu=cortex-a55 %s 2>&1 |\
// RUN:   FileCheck %s --check-prefix=CRC
// RUN: llvm-mc -triple aarch64-- -mcpu=cortex-a75 %s 2>&1 |\
// RUN:   FileCheck %s --check-prefix=CRC
// RUN: llvm-mc -triple aarch64-- -mcpu=tsv110 %s 2>&1 |\
// RUN:   FileCheck %s --check-prefix=CRC

// RUN: not llvm-mc -triple aarch64-- %s 2>&1 |\
// RUN:   FileCheck %s --check-prefix=NOCRC
// RUN: not llvm-mc -triple aarch64-- -mcpu=cyclone %s 2>&1 |\
// RUN:   FileCheck %s --check-prefix=NOCRC

    crc32b w0, w1, w5
    crc32h w3, w5, w6
    crc32w w19, wzr, w20
    crc32x w3, w5, x20

// CRC: crc32b w0, w1, w5
// CRC: crc32h w3, w5, w6
// CRC: crc32w w19, wzr, w20
// CRC: crc32x w3, w5, x20

// NOCRC: error: instruction requires: crc
// NOCRC:     crc32b w0, w1, w5
// NOCRC: error: instruction requires: crc
// NOCRC:     crc32h w3, w5, w6
// NOCRC: error: instruction requires: crc
// NOCRC:     crc32w w19, wzr, w20
// NOCRC: error: instruction requires: crc
// NOCRC:     crc32x w3, w5, x20

    crc32cb w5, w10, w15
    crc32ch w3, w5, w7
    crc32cw w11, w13, w17
    crc32cx w19, w23, x29

// CRC: crc32cb w5, w10, w15
// CRC: crc32ch w3, w5, w7
// CRC: crc32cw w11, w13, w17
// CRC: crc32cx w19, w23, x29

// NOCRC: error: instruction requires: crc
// NOCRC:     crc32cb w5, w10, w15
// NOCRC: error: instruction requires: crc
// NOCRC:     crc32ch w3, w5, w7
// NOCRC: error: instruction requires: crc
// NOCRC:     crc32cw w11, w13, w17
// NOCRC: error: instruction requires: crc
// NOCRC:     crc32cx w19, w23, x29