vec_sll example #24

Closed
opened 4 years ago by wschmidt-ibm · 6 comments
wschmidt-ibm commented 4 years ago (Migrated from github.com)

PC suggests an example of the vec_sll endian issue. Not a show-stopper if this isn't done.

PC suggests an example of the vec_sll endian issue. Not a show-stopper if this isn't done.
ThinkOpenly commented 4 years ago (Migrated from github.com)

Would this be better in section 2.5 Vector Built-In Functions or section 4.2 Built-In Vector Functions?

Would this be better in section 2.5 _Vector Built-In Functions_ or section 4.2 _Built-In Vector Functions_?
wschmidt-ibm commented 4 years ago (Migrated from github.com)

I think 4.2, please.

I think 4.2, please.
ThinkOpenly commented 4 years ago (Migrated from github.com)

After thinking on this a bit, given the general compactness and fairly consistent presentation in 4.2, I think it would be awkward and perhaps more confusing than helpful to add a bad example within the definition for vec_sll.
I would be more inclined toward adding a bad example in section 2.5 as an example of what happens if endianness is not accommodated for endian-sensitive intrinsics.
Or, perhaps this issue should just be closed, since all of the impacted intrinsics clearly say "This intrinsic is not endian-neutral, so uses of vec_sll in big-endian code must be rewritten for little-endian targets."
Another option, after reading that quote again, is to put an example, perhaps in section 2.5, of how "code must be rewritten for little-endian targets", since this document provides no specific guidance. (In the entire document, the only uses of "swap" are in vec_xl and vec_xst.)

After thinking on this a bit, given the general compactness and fairly consistent presentation in 4.2, I think it would be awkward and perhaps more confusing than helpful to add a _bad_ example within the definition for `vec_sll`. I would be more inclined toward adding a bad example in section 2.5 as an example of what happens if endianness is not accommodated for endian-sensitive intrinsics. Or, perhaps this issue should just be closed, since all of the impacted intrinsics clearly say "This intrinsic is _not_ endian-neutral, so uses of `vec_sll` in big-endian code must be rewritten for little-endian targets." Another option, after reading that quote again, is to put an example, perhaps in section 2.5, of how "code must be rewritten for little-endian targets", since this document provides no specific guidance. (In the entire document, the only uses of "swap" are in `vec_xl` and `vec_xst`.)
wschmidt-ibm commented 4 years ago (Migrated from github.com)

I think if you want to go that route, the more appropriate place is section 2.7, which is specifically for this purpose.

I think if you want to go that route, the more appropriate place is section 2.7, which is specifically for this purpose.
wschmidt-ibm commented 4 years ago (Migrated from github.com)

I honestly don't care whether or not we explain this, given that vec_sll is not a terribly useful interface. vec_sl, vec_sld, and vec_slo are more sensible.

I honestly don't care whether or not we explain this, given that vec_sll is not a terribly useful interface. vec_sl, vec_sld, and vec_slo are more sensible.
wschmidt-ibm commented 4 years ago (Migrated from github.com)

In fact, I would really lean towards closing this issue. :-D

In fact, I would really lean towards closing this issue. :-D
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: systemsoftware/Programming-Guides#24
Loading…
There is no content yet.