Changeset babf5d3 in git
- Timestamp:
- May 11, 1998, 12:01:56 PM (25 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- c7e16e1b8b899cbf361c96061f2118cc4a4fb954
- Parents:
- c40119ecffa51b841f092c090d4c4a4e5be673d0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/imm.cc
rc40119 rbabf5d3 1 #ifdef __MWERKS__ 1 /* emacs edit mode for this file is -*- C++ -*- */ 2 /* $Id: imm.cc,v 1.2 1998-05-11 10:01:56 schmidt Exp $ */ 3 4 //{{{ docu 5 // 6 // imm.cc - some special implementations of immediate functions 7 // for some special platforms. 8 // 9 //}}} 10 11 #include <config.h> 12 13 #include <stuff_64.h> 2 14 3 15 #include "imm.h" 4 #include <stuff_64.h>5 16 6 InternalCF * imm_mul (InternalCF * lhs, InternalCF * rhs ) 17 //{{{ InternalCF * imm_mul (InternalCF * lhs, InternalCF * rhs ) 18 //{{{ docu 19 // 20 // imm_mul() - multiplication of two immediates. 21 // 22 // Special implementation for MetroWerks. 23 // 24 //}}} 25 InternalCF * 26 imm_mul (InternalCF * lhs, InternalCF * rhs ) 7 27 { 8 28 int li = imm2int( lhs ), ri = imm2int( rhs ); … … 11 31 if (li<0) 12 32 { 13 14 15 16 33 if (ri<0) 34 mul_64(&pr, -li, -ri); 35 else 36 mul_64(&pr, -li, ri); 17 37 } 18 38 else 19 39 { 20 21 22 23 40 if (ri<0) 41 mul_64(&pr, li, -ri); 42 else 43 mul_64(&pr, li, ri); 24 44 } 45 25 46 if (pr.hi || (pr.lo>MAXIMMEDIATE)) 26 47 { 27 28 48 InternalCF * res = CFFactory::basic( IntegerDomain, li, true ); 49 return res->mulcoeff( rhs ); 29 50 } 30 51 else 31 52 { 32 33 34 35 36 37 53 int res = pr.lo; 54 if ((li>0) == (ri>0)) 55 return int2imm(res); 56 else 57 return int2imm(-res); 58 } 38 59 } 39 40 #endif 60 //}}}
Note: See TracChangeset
for help on using the changeset viewer.