diff options
Diffstat (limited to 'src/pkg/runtime/vlrt_386.c')
-rw-r--r-- | src/pkg/runtime/vlrt_386.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/pkg/runtime/vlrt_386.c b/src/pkg/runtime/vlrt_386.c index 1631dbe10..8d965c086 100644 --- a/src/pkg/runtime/vlrt_386.c +++ b/src/pkg/runtime/vlrt_386.c @@ -23,6 +23,8 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#include "../../cmd/ld/textflag.h" + /* * C runtime for 64-bit divide, others. * @@ -145,7 +147,7 @@ _v2f(Vlong x) } ulong _div64by32(Vlong, ulong, ulong*); -void _mul64by32(Vlong*, Vlong, ulong); +int _mul64by32(Vlong*, Vlong, ulong); static void slowdodiv(Vlong num, Vlong den, Vlong *q, Vlong *r) @@ -230,8 +232,7 @@ dodiv(Vlong num, Vlong den, Vlong *qp, Vlong *rp) if(den.hi != 0){ q.hi = 0; n = num.hi/den.hi; - _mul64by32(&x, den, n); - if(x.hi > num.hi || (x.hi == num.hi && x.lo > num.lo)) + if(_mul64by32(&x, den, n) || x.hi > num.hi || (x.hi == num.hi && x.lo > num.lo)) slowdodiv(num, den, &q, &r); else { q.lo = n; @@ -423,6 +424,7 @@ _rshlv(Vlong *r, Vlong a, int b) r->lo = (t << (32-b)) | (a.lo >> b); } +#pragma textflag NOSPLIT void _lshv(Vlong *r, Vlong a, int b) { |