Changeset b56f55c


Ignore:
Timestamp:
Jul 11, 2020, 6:32:46 PM (4 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
bb83b47
Parents:
6437ce4
Message:

add int128 constructor to compose values from two ints

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/prelude/builtins.c

    r6437ce4 rb56f55c  
    1010// Created On       : Fri Jul 21 16:21:03 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Nov 21 16:31:39 2019
    13 // Update Count     : 101
     12// Last Modified On : Wed Jul  8 22:43:14 2020
     13// Update Count     : 105
    1414//
    1515
     
    9595static inline forall( dtype DT ) DT * intptr( uintptr_t addr ) { return (DT *)addr; }
    9696
     97// constructor for 128-bit numbers (all constants are unsigned as +/- are operators)
     98static inline void ?{}( unsigned int128 & this, unsigned long int h, unsigned long int l ) {
     99        this = (unsigned int128)h << 64 | (unsigned int128)l;
     100} // ?{}
     101
    97102// exponentiation operator implementation
    98103
Note: See TracChangeset for help on using the changeset viewer.