Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ARM DSP: add quad/double add/sub + exchange and select bytes intrinsics #532

Merged
merged 1 commit into from
Jul 21, 2018
Merged

Conversation

paoloteti
Copy link
Contributor

This PR add the following DSP intrinsics:

  • Quad 8-bit addition/subtraction
  • Double 8-bit addition/subtraction
  • Saturating Add and Subtract with Exchange and
    Saturating Subtract and Add with Exchange, signed
  • Select bytes based on GE bits

This patch bump the assert_instr limit to 22 (from 20) instead of add a lots of exception for all DSP intrinsics.

…nsics

- Quad 8-bit addition/subtraction
- Double 8-bit addition/subtraction
- Saturating Add and Subtract with Exchange and
  Saturating Subtract and Add with Exchange, signed
- Select bytes based on GE bits

This patch bump the `assert_instr` limit to 22 (from 20) instead of
add a lots of exception for all DSP intrinsics.
@@ -135,7 +232,7 @@ mod tests {
let a = i8x4::new(1, 2, 3, ::std::i8::MAX);
let b = i8x4::new(2, -1, 0, 1);
let c = i8x4::new(3, 1, 3, ::std::i8::MAX);
let r: i8x4 = ::mem::transmute(dsp::qadd8(::mem::transmute(a), ::mem::transmute(b)));
let r: i8x4 = dsp_call!(dsp::qadd8, a, b);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is the macro being used in the tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to cut long lines. For sure I can use ::mem::transmute, but for my understanding why is it wrong here?

@alexcrichton alexcrichton merged commit e6ff097 into rust-lang:master Jul 21, 2018
@alexcrichton
Copy link
Member

👍

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants