Skip to content

Commit

Permalink
correct assert_instr
Browse files Browse the repository at this point in the history
  • Loading branch information
SparrowLii committed Mar 16, 2021
1 parent 85718e2 commit 8d094ca
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
16 changes: 8 additions & 8 deletions crates/core_arch/src/aarch64/neon/generated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,7 @@ pub unsafe fn vcvtx_high_f32_f64(a: float32x2_t, b: float64x2_t) -> float32x4_t
/// Floating-point convert to signed fixed-point, rounding toward zero
#[inline]
#[target_feature(enable = "neon")]
#[cfg_attr(test, assert_instr(fcvtzs))]
#[cfg_attr(test, assert_instr("fcvtzs.f32"))]
pub unsafe fn vcvt_s32_f32(a: float32x2_t) -> int32x2_t {
#[allow(improper_ctypes)]
extern "C" {
Expand All @@ -1169,7 +1169,7 @@ pub unsafe fn vcvt_s32_f32(a: float32x2_t) -> int32x2_t {
/// Floating-point convert to signed fixed-point, rounding toward zero
#[inline]
#[target_feature(enable = "neon")]
#[cfg_attr(test, assert_instr(fcvtzs))]
#[cfg_attr(test, assert_instr("fcvtzs.f32"))]
pub unsafe fn vcvtq_s32_f32(a: float32x4_t) -> int32x4_t {
#[allow(improper_ctypes)]
extern "C" {
Expand All @@ -1182,7 +1182,7 @@ pub unsafe fn vcvtq_s32_f32(a: float32x4_t) -> int32x4_t {
/// Floating-point convert to signed fixed-point, rounding toward zero
#[inline]
#[target_feature(enable = "neon")]
#[cfg_attr(test, assert_instr(fcvtzs))]
#[cfg_attr(test, assert_instr("fcvtzs.f64"))]
pub unsafe fn vcvt_s64_f64(a: float64x1_t) -> int64x1_t {
#[allow(improper_ctypes)]
extern "C" {
Expand All @@ -1195,7 +1195,7 @@ pub unsafe fn vcvt_s64_f64(a: float64x1_t) -> int64x1_t {
/// Floating-point convert to signed fixed-point, rounding toward zero
#[inline]
#[target_feature(enable = "neon")]
#[cfg_attr(test, assert_instr(fcvtzs))]
#[cfg_attr(test, assert_instr("fcvtzs.f64"))]
pub unsafe fn vcvtq_s64_f64(a: float64x2_t) -> int64x2_t {
#[allow(improper_ctypes)]
extern "C" {
Expand Down Expand Up @@ -1416,7 +1416,7 @@ pub unsafe fn vcvtpq_s64_f64(a: float64x2_t) -> int64x2_t {
/// Floating-point convert to unsigned fixed-point, rounding toward zero
#[inline]
#[target_feature(enable = "neon")]
#[cfg_attr(test, assert_instr(fcvtzu))]
#[cfg_attr(test, assert_instr("fcvtzu.f32"))]
pub unsafe fn vcvt_u32_f32(a: float32x2_t) -> uint32x2_t {
#[allow(improper_ctypes)]
extern "C" {
Expand All @@ -1429,7 +1429,7 @@ pub unsafe fn vcvt_u32_f32(a: float32x2_t) -> uint32x2_t {
/// Floating-point convert to unsigned fixed-point, rounding toward zero
#[inline]
#[target_feature(enable = "neon")]
#[cfg_attr(test, assert_instr(fcvtzu))]
#[cfg_attr(test, assert_instr("fcvtzu.f32"))]
pub unsafe fn vcvtq_u32_f32(a: float32x4_t) -> uint32x4_t {
#[allow(improper_ctypes)]
extern "C" {
Expand All @@ -1442,7 +1442,7 @@ pub unsafe fn vcvtq_u32_f32(a: float32x4_t) -> uint32x4_t {
/// Floating-point convert to unsigned fixed-point, rounding toward zero
#[inline]
#[target_feature(enable = "neon")]
#[cfg_attr(test, assert_instr(fcvtzu))]
#[cfg_attr(test, assert_instr("fcvtzu.f64"))]
pub unsafe fn vcvt_u64_f64(a: float64x1_t) -> uint64x1_t {
#[allow(improper_ctypes)]
extern "C" {
Expand All @@ -1455,7 +1455,7 @@ pub unsafe fn vcvt_u64_f64(a: float64x1_t) -> uint64x1_t {
/// Floating-point convert to unsigned fixed-point, rounding toward zero
#[inline]
#[target_feature(enable = "neon")]
#[cfg_attr(test, assert_instr(fcvtzu))]
#[cfg_attr(test, assert_instr("fcvtzu.f64"))]
pub unsafe fn vcvtq_u64_f64(a: float64x2_t) -> uint64x2_t {
#[allow(improper_ctypes)]
extern "C" {
Expand Down
4 changes: 2 additions & 2 deletions crates/stdarch-gen/neon.spec
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ double-suffixes
a = -1.0, 2.0, -3.0, 4.0
validate -1, 2, -3, 4

aarch64 = fcvtzs
aarch64 = fcvtzs.s
link-aarch64 = fcvtzs._EXT2_._EXT_
generate float32x2_t:int32x2_t, float32x4_t:int32x4_t, float64x1_t:int64x1_t, float64x2_t:int64x2_t

Expand Down Expand Up @@ -728,7 +728,7 @@ double-suffixes
a = 1.0, 2.0, 3.0, 4.0
validate 1, 2, 3, 4

aarch64 = fcvtzu
aarch64 = fcvtzu.s
link-aarch64 = fcvtzu._EXT2_._EXT_
generate float32x2_t:uint32x2_t, float32x4_t:uint32x4_t, float64x1_t:uint64x1_t, float64x2_t:uint64x2_t

Expand Down
7 changes: 4 additions & 3 deletions crates/stdarch-gen/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ fn gen_aarch64(
#[cfg_attr(test, assert_instr({}))]
{}
"#,
current_comment, current_aarch64, call
current_comment, expand_intrinsic(&current_aarch64, in_t), call
);

let test = gen_test(
Expand Down Expand Up @@ -1190,7 +1190,7 @@ mod test {
tests_aarch64.push('}');
tests_aarch64.push('\n');

let arm_out_path: PathBuf = PathBuf::from(env::var("OUT_DIR").unwrap())
let arm_out_path: PathBuf = PathBuf::from("./crates/core_arch")
.join("src")
.join("arm")
.join("neon");
Expand All @@ -1200,7 +1200,8 @@ mod test {
file_arm.write_all(out_arm.as_bytes())?;
file_arm.write_all(tests_arm.as_bytes())?;

let aarch64_out_path: PathBuf = PathBuf::from(env::var("OUT_DIR").unwrap())
//let aarch64_out_path: PathBuf = PathBuf::from(env::var("OUT_DIR").unwrap())
let aarch64_out_path: PathBuf = PathBuf::from("./crates/core_arch")
.join("src")
.join("aarch64")
.join("neon");
Expand Down

0 comments on commit 8d094ca

Please sign in to comment.