Deleted Added
full compact
sysdep.c (329145) sysdep.c (332154)
1/*******************************************************************
2** s y s d e p . c
3** Forth Inspired Command Language
4** Author: John Sadler (john_sadler@alum.mit.edu)
5** Created: 16 Oct 1997
6** Implementations of FICL external interface functions...
7**
8*******************************************************************/
9
1/*******************************************************************
2** s y s d e p . c
3** Forth Inspired Command Language
4** Author: John Sadler (john_sadler@alum.mit.edu)
5** Created: 16 Oct 1997
6** Implementations of FICL external interface functions...
7**
8*******************************************************************/
9
10/* $FreeBSD: stable/11/stand/ficl/aarch64/sysdep.c 281297 2015-04-09 10:00:26Z andrew $ */
10/* $FreeBSD: stable/11/stand/ficl/aarch64/sysdep.c 332154 2018-04-06 21:37:25Z kevans $ */
11
12#ifdef TESTMAIN
13#include <stdio.h>
14#include <stdlib.h>
15#else
16#include <stand.h>
17#endif
18#include "ficl.h"
19
20/*
21******************* FreeBSD P O R T B E G I N S H E R E ******************** Michael Smith
22*/
23
24#if PORTABLE_LONGMULDIV == 0
25DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
26{
27 DPUNS q;
11
12#ifdef TESTMAIN
13#include <stdio.h>
14#include <stdlib.h>
15#else
16#include <stand.h>
17#endif
18#include "ficl.h"
19
20/*
21******************* FreeBSD P O R T B E G I N S H E R E ******************** Michael Smith
22*/
23
24#if PORTABLE_LONGMULDIV == 0
25DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
26{
27 DPUNS q;
28 u_int64_t qx;
28 uint64_t qx;
29
29
30 qx = (u_int64_t)x * (u_int64_t) y;
30 qx = (uint64_t)x * (uint64_t) y;
31
31
32 q.hi = (u_int32_t)( qx >> 32 );
33 q.lo = (u_int32_t)( qx & 0xFFFFFFFFL);
32 q.hi = (uint32_t)( qx >> 32 );
33 q.lo = (uint32_t)( qx & 0xFFFFFFFFL);
34
35 return q;
36}
37
38UNSQR ficlLongDiv(DPUNS q, FICL_UNS y)
39{
40 UNSQR result;
34
35 return q;
36}
37
38UNSQR ficlLongDiv(DPUNS q, FICL_UNS y)
39{
40 UNSQR result;
41 u_int64_t qx, qh;
41 uint64_t qx, qh;
42
43 qh = q.hi;
44 qx = (qh << 32) | q.lo;
45
46 result.quot = qx / y;
47 result.rem = qx % y;
48
49 return result;

--- 50 unchanged lines hidden ---
42
43 qh = q.hi;
44 qx = (qh << 32) | q.lo;
45
46 result.quot = qx / y;
47 result.rem = qx % y;
48
49 return result;

--- 50 unchanged lines hidden ---