Page MenuHomePhabricator

Add the __qdbl intrinsic to the arm_acle.h header

Authored by mroth on Jul 2 2014, 5:50 AM.



Hi all,

ACLE section 9.4.2 defines the __qdbl intrinsic:

int32_t qdbl(int32_t);
Doubles a signed 32-bit number, with saturation.
qdbl(x) is equal to __qadd(x,x) except that the argument x is evaluated only once.
Sets the Q flag if the addition saturates.

Since we already have an arm_acle.h header file with qadd implemented, it's trivial to implement this. I've also added a test that should make sure the argument is only evaluated once - this would catch e.g. if someone decided to do #define qdbl(X) __qadd(X,X) instead, which evaluates X twice. Does this look reasonable?


Diff Detail

Event Timeline

mroth updated this revision to Diff 11025.Jul 2 2014, 5:50 AM
mroth retitled this revision from to Add the __qdbl intrinsic to the arm_acle.h header.
mroth updated this object.
mroth edited the test plan for this revision. (Show Details)
mroth added reviewers: rengolin, compnerd.
mroth added subscribers: Unknown Object (MLST), kongyi.

Hi Moritz,

LGTM! Thanks for extending the ACLE support.



rengolin accepted this revision.Jul 2 2014, 6:04 AM
rengolin edited edge metadata.

LGTM too.


This revision is now accepted and ready to land.Jul 2 2014, 6:04 AM
compnerd accepted this revision.Jul 2 2014, 10:22 AM
compnerd edited edge metadata.


rengolin closed this revision.Jul 3 2014, 3:23 AM