OLD | NEW |
1 // Inferno's libkern/vlrt-arm.c | 1 // Inferno's libkern/vlrt-arm.c |
2 // http://code.google.com/p/inferno-os/source/browse/libkern/vlrt-arm.c | 2 // http://code.google.com/p/inferno-os/source/browse/libkern/vlrt-arm.c |
3 // | 3 // |
4 // Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved. | 4 // Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved. |
5 // Revisions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vita
nuova.com). All rights reserved. | 5 // Revisions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vita
nuova.com). All rights reserved. |
6 // Portions Copyright 2009 The Go Authors. All rights reserved. | 6 // Portions Copyright 2009 The Go Authors. All rights reserved. |
7 // | 7 // |
8 // Permission is hereby granted, free of charge, to any person obtaining a copy | 8 // Permission is hereby granted, free of charge, to any person obtaining a copy |
9 // of this software and associated documentation files (the "Software"), to deal | 9 // of this software and associated documentation files (the "Software"), to deal |
10 // in the Software without restriction, including without limitation the rights | 10 // in the Software without restriction, including without limitation the rights |
(...skipping 18 matching lines...) Expand all Loading... |
29 void runtime·panicstring(char*); | 29 void runtime·panicstring(char*); |
30 | 30 |
31 typedef unsigned long ulong; | 31 typedef unsigned long ulong; |
32 typedef unsigned int uint; | 32 typedef unsigned int uint; |
33 typedef unsigned short ushort; | 33 typedef unsigned short ushort; |
34 typedef unsigned char uchar; | 34 typedef unsigned char uchar; |
35 typedef signed char schar; | 35 typedef signed char schar; |
36 | 36 |
37 #define SIGN(n) (1UL<<(n-1)) | 37 #define SIGN(n) (1UL<<(n-1)) |
38 | 38 |
39 void | |
40 runtime·panicdivide(void) | |
41 { | |
42 runtime·panicstring("integer divide by zero"); | |
43 } | |
44 | |
45 typedef struct Vlong Vlong; | 39 typedef struct Vlong Vlong; |
46 struct Vlong | 40 struct Vlong |
47 { | 41 { |
48 union | 42 union |
49 { | 43 { |
50 struct | 44 struct |
51 { | 45 { |
52 ulong lo; | 46 ulong lo; |
53 ulong hi; | 47 ulong hi; |
54 }; | 48 }; |
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
803 return lv.hi > rv.hi || | 797 return lv.hi > rv.hi || |
804 (lv.hi == rv.hi && lv.lo > rv.lo); | 798 (lv.hi == rv.hi && lv.lo > rv.lo); |
805 } | 799 } |
806 | 800 |
807 int | 801 int |
808 _hsv(Vlong lv, Vlong rv) | 802 _hsv(Vlong lv, Vlong rv) |
809 { | 803 { |
810 return lv.hi > rv.hi || | 804 return lv.hi > rv.hi || |
811 (lv.hi == rv.hi && lv.lo >= rv.lo); | 805 (lv.hi == rv.hi && lv.lo >= rv.lo); |
812 } | 806 } |
OLD | NEW |