News for hackers. Stuff that matters.
Re:The Problem with Friendly C by Dylan16807 on Thursday December 24, 2015 @11:18PM (#10790401)
"ascii adjust after addition"

> Nope, PADDW is a variant of PADDSW, so whatever PADDSW does is what matters, and PADDSW does saturating addition.

That's like arguing that Red Sports Car is a variant of Red Sports Car with Stripes. The one that adds adjectives is the variant, the one without those adjectives is the base.

If PADDW did saturating arithmetic and PADDWW did wrapping, I would agree with you, but that's not how x86 works.

Re:The Problem with Friendly C by ori_b on Saturday December 26, 2015 @12:04AM (#10793342)
It is, however, what many DSPs do.
Re:The Problem with Friendly C by makomk on Saturday December 26, 2015 @05:31AM (#10793824)
Many DSPs don't support byte addressing or arithmetic on 8-bit integers which a huge amount of non-DSP C code relies on. They're not exactly friendly to code not written specifically to run on the DSP. (Or C code in general, for that matter - the reason they have saturating addition and other oddball instructions is because it makes a lot of DSP code faster, but there's no C representation of any of those things.)
Re:The Problem with Friendly C by ori_b on Sunday December 27, 2015 @03:52AM (#10796891)
And now we get back to the initial quote: "What's your point? If you define a "plain integer addition" to be "wrapping binary two-complement addition", then there isn't, otherwise, there is."
Re:The Problem with Friendly C by Dylan16807 on Monday December 28, 2015 @05:01AM (#10800548)
Okay, well since it's my term, I'll make it absolutely clear. The definition is not circular. On those DSPs, plain integer addition is saturating. For x86, so far all evidence points to it being twos-complement.

So the original original quote, "on x86 INT_MAX+1==INT_MIN", is true. As far as I can tell.