Changeset 6b96ab44 in mainline
- Timestamp:
- 2005-05-17T22:43:57Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1eee8383
- Parents:
- 7f1bfce
- Location:
- arch
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/include/context.h
r7f1bfce r6b96ab44 32 32 #include <arch/types.h> 33 33 34 /* 35 * Both context_save() and context_restore() eat two doublewords from the stack. 36 * First for pop of the saved register, second during ret instruction. 37 */ 34 38 #define SP_DELTA 8 35 39 -
arch/ia64/include/context.h
r7f1bfce r6b96ab44 32 32 #include <arch/types.h> 33 33 34 #define SP_DELTA 16 34 /* 35 * context_save() and context_restore() are both leaf procedures. 36 * No need to allocate scratch area. 37 */ 38 #define SP_DELTA 0 35 39 36 40 struct context { 41 /* 42 * General registers 43 */ 37 44 __u64 r1; 38 45 __u64 r2; … … 66 73 __u64 r30; 67 74 __u64 r31; 75 76 /* 77 * Branch registers 78 */ 68 79 __u64 pc; /* b0 */ 80 __u64 b1; 81 __u64 b2; 82 __u64 b3; 83 __u64 b4; 84 __u64 b5; 85 __u64 b6; 86 __u64 b7; 87 88 /* 89 * Predicate registers 90 */ 91 __u64 pr; 92 69 93 pri_t pri; 70 94 } __attribute__ ((packed)); -
arch/ia64/include/types.h
r7f1bfce r6b96ab44 41 41 typedef __u64 __address; 42 42 43 typedef __u 32pri_t;43 typedef __u64 pri_t; 44 44 45 45 typedef __u64 __native; -
arch/ia64/src/context.S
r7f1bfce r6b96ab44 33 33 34 34 context_save: 35 alloc loc0 = ar.pfs, 1, 2, 0, 035 alloc loc0 = ar.pfs, 1, 9, 0, 0 36 36 37 37 /* … … 39 39 */ 40 40 41 /* 42 * Save general registers 43 */ 41 44 st8 [in0] = r1, 8 ;; 42 45 st8 [in0] = r2, 8 ;; … … 71 74 st8 [in0] = r31, 8 ;; 72 75 73 /* save pc */ 76 /* 77 * Save branch registers 78 */ 74 79 mov loc1 = b0 ;; 80 st8 [in0] = loc1, 8 /* save pc */ 81 mov loc2 = b1 ;; 82 st8 [in0] = loc2, 8 83 mov loc3 = b2 ;; 84 st8 [in0] = loc3, 8 85 mov loc4 = b3 ;; 86 st8 [in0] = loc4, 8 87 mov loc5 = b4 ;; 88 st8 [in0] = loc5, 8 89 mov loc6 = b5 ;; 90 st8 [in0] = loc6, 8 91 mov loc7 = b6 ;; 92 st8 [in0] = loc7, 8 93 mov loc8 = b7 ;; 94 st8 [in0] = loc8, 8 95 96 /* 97 * Save predicate registers 98 */ 99 mov loc1 = pr ;; 75 100 st8 [in0] = loc1, 8 76 101 … … 81 106 82 107 context_restore: 83 alloc loc0 = ar.pfs, 1, 2, 0, 0108 alloc loc0 = ar.pfs, 1, 9, 0, 0 84 109 85 110 /* … … 87 112 */ 88 113 114 /* 115 * Restore general registers 116 */ 89 117 ld8 r1 = [in0], 8 ;; 90 118 ld8 r2 = [in0], 8 ;; … … 119 147 ld8 r31 = [in0], 8 ;; 120 148 121 /* restore pc */ 149 /* 150 * Restore branch registers 151 */ 152 ld8 loc1 = [in0], 8 ;; /* restore pc */ 153 mov b0 = loc1 154 ld8 loc2 = [in0], 8 ;; 155 mov b1 = loc2 156 ld8 loc3 = [in0], 8 ;; 157 mov b2 = loc3 158 ld8 loc4 = [in0], 8 ;; 159 mov b3 = loc4 160 ld8 loc5 = [in0], 8 ;; 161 mov b4 = loc5 162 ld8 loc6 = [in0], 8 ;; 163 mov b5 = loc6 164 ld8 loc7 = [in0], 8 ;; 165 mov b6 = loc7 166 ld8 loc8 = [in0], 8 ;; 167 mov b7 = loc8 168 122 169 ld8 loc1 = [in0], 8 ;; 123 mov b0 = loc1170 mov pr = loc1, ~0 124 171 125 172 mov ar.pfs = loc0
Note:
See TracChangeset
for help on using the changeset viewer.