Mercurial > octave-nkf
comparison libinterp/corefcn/jit-typeinfo.cc @ 18592:e1437c1a3db1 draft
Fix int8 type sub
author | LYH <lyh.kernel@gmail.com> |
---|---|
date | Fri, 21 Mar 2014 14:59:39 -0400 |
parents | 220acec2742e |
children | 894a4b184b08 |
comparison
equal
deleted
inserted
replaced
18591:220acec2742e | 18592:e1437c1a3db1 |
---|---|
575 uint8_t res = ulhs - urhs; | 575 uint8_t res = ulhs - urhs; |
576 | 576 |
577 ulhs = (ulhs >> 7) + SCHAR_MAX; | 577 ulhs = (ulhs >> 7) + SCHAR_MAX; |
578 | 578 |
579 /* Force compiler to use cmovns instruction */ | 579 /* Force compiler to use cmovns instruction */ |
580 if ((uint8_t)((ulhs ^ urhs) & (ulhs ^ res)) < 0) | 580 if ((int8_t)((ulhs ^ urhs) & (ulhs ^ res)) < 0) |
581 { | 581 { |
582 res = ulhs; | 582 res = ulhs; |
583 } | 583 } |
584 | 584 |
585 return res; | 585 return res; |