82 lines · plain
1// RUN: llvm-mc -triple aarch64-none-linux-gnu -mattr=+neon -show-encoding < %s | FileCheck %s2 3//------------------------------------------------------------------------------4// Scalar Integer Saturating Add (Signed)5//------------------------------------------------------------------------------6 sqadd b0, b1, b27 sqadd h10, h11, h128 sqadd s20, s21, s29 sqadd d17, d31, d810 11// CHECK: sqadd b0, b1, b2 // encoding: [0x20,0x0c,0x22,0x5e]12// CHECK: sqadd h10, h11, h12 // encoding: [0x6a,0x0d,0x6c,0x5e]13// CHECK: sqadd s20, s21, s2 // encoding: [0xb4,0x0e,0xa2,0x5e]14// CHECK: sqadd d17, d31, d8 // encoding: [0xf1,0x0f,0xe8,0x5e]15 16//------------------------------------------------------------------------------17// Scalar Integer Saturating Add (Unsigned)18//------------------------------------------------------------------------------19 uqadd b0, b1, b220 uqadd h10, h11, h1221 uqadd s20, s21, s222 uqadd d17, d31, d823 24// CHECK: uqadd b0, b1, b2 // encoding: [0x20,0x0c,0x22,0x7e]25// CHECK: uqadd h10, h11, h12 // encoding: [0x6a,0x0d,0x6c,0x7e]26// CHECK: uqadd s20, s21, s2 // encoding: [0xb4,0x0e,0xa2,0x7e]27// CHECK: uqadd d17, d31, d8 // encoding: [0xf1,0x0f,0xe8,0x7e]28 29//------------------------------------------------------------------------------30// Scalar Integer Saturating Sub (Signed)31//------------------------------------------------------------------------------32 sqsub b0, b1, b233 sqsub h10, h11, h1234 sqsub s20, s21, s235 sqsub d17, d31, d836 37// CHECK: sqsub b0, b1, b2 // encoding: [0x20,0x2c,0x22,0x5e]38// CHECK: sqsub h10, h11, h12 // encoding: [0x6a,0x2d,0x6c,0x5e]39// CHECK: sqsub s20, s21, s2 // encoding: [0xb4,0x2e,0xa2,0x5e]40// CHECK: sqsub d17, d31, d8 // encoding: [0xf1,0x2f,0xe8,0x5e]41 42//------------------------------------------------------------------------------43// Scalar Integer Saturating Sub (Unsigned)44//------------------------------------------------------------------------------45 uqsub b0, b1, b246 uqsub h10, h11, h1247 uqsub s20, s21, s248 uqsub d17, d31, d849 50// CHECK: uqsub b0, b1, b2 // encoding: [0x20,0x2c,0x22,0x7e]51// CHECK: uqsub h10, h11, h12 // encoding: [0x6a,0x2d,0x6c,0x7e]52// CHECK: uqsub s20, s21, s2 // encoding: [0xb4,0x2e,0xa2,0x7e]53// CHECK: uqsub d17, d31, d8 // encoding: [0xf1,0x2f,0xe8,0x7e]54 55//----------------------------------------------------------------------56// Signed Saturating Accumulated of Unsigned Value57//----------------------------------------------------------------------58 59 suqadd b19, b1460 suqadd h20, h1561 suqadd s21, s1262 suqadd d18, d2263 64// CHECK: suqadd b19, b14 // encoding: [0xd3,0x39,0x20,0x5e]65// CHECK: suqadd h20, h15 // encoding: [0xf4,0x39,0x60,0x5e]66// CHECK: suqadd s21, s12 // encoding: [0x95,0x39,0xa0,0x5e]67// CHECK: suqadd d18, d22 // encoding: [0xd2,0x3a,0xe0,0x5e]68 69//----------------------------------------------------------------------70// Unsigned Saturating Accumulated of Signed Value71//----------------------------------------------------------------------72 73 usqadd b19, b1474 usqadd h20, h1575 usqadd s21, s1276 usqadd d18, d2277 78// CHECK: usqadd b19, b14 // encoding: [0xd3,0x39,0x20,0x7e]79// CHECK: usqadd h20, h15 // encoding: [0xf4,0x39,0x60,0x7e]80// CHECK: usqadd s21, s12 // encoding: [0x95,0x39,0xa0,0x7e]81// CHECK: usqadd d18, d22 // encoding: [0xd2,0x3a,0xe0,0x7e]82