Subversion Repositories HelenOS

Rev

Rev 3993 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3993 Rev 4130
Line 169... Line 169...
169
    asm volatile ("rdpr %%tick, %0\n" : "=r" (v));
169
    asm volatile ("rdpr %%tick, %0\n" : "=r" (v));
170
   
170
   
171
    return v;
171
    return v;
172
}
172
}
173
 
173
 
174
/** Write TICK Register.
-
 
175
 *
-
 
176
 * @param v New value of TICK register.
-
 
177
 */
-
 
178
static inline void tick_write(uint64_t v)
-
 
179
{
-
 
180
    asm volatile ("wrpr %0, %1, %%tick\n" : : "r" (v), "i" (0));
-
 
181
}
-
 
182
 
-
 
183
/** Read FPRS Register.
174
/** Read FPRS Register.
184
 *
175
 *
185
 * @return Value of FPRS register.
176
 * @return Value of FPRS register.
186
 */
177
 */
187
static inline uint64_t fprs_read(void)
178
static inline uint64_t fprs_read(void)
Line 321... Line 312...
321
    asm volatile ("add %%sp, %1, %0\n" : "=r" (unbiased_sp) : "i" (STACK_BIAS));
312
    asm volatile ("add %%sp, %1, %0\n" : "=r" (unbiased_sp) : "i" (STACK_BIAS));
322
   
313
   
323
    return ALIGN_DOWN(unbiased_sp, STACK_SIZE);
314
    return ALIGN_DOWN(unbiased_sp, STACK_SIZE);
324
}
315
}
325
 
316
 
326
/** Read Version Register.
-
 
327
 *
-
 
328
 * @return Value of VER register.
-
 
329
 */
-
 
330
static inline uint64_t ver_read(void)
-
 
331
{
-
 
332
    uint64_t v;
-
 
333
   
-
 
334
    asm volatile ("rdpr %%ver, %0\n" : "=r" (v));
-
 
335
   
-
 
336
    return v;
-
 
337
}
-
 
338
 
-
 
339
/** Read Trap Program Counter register.
317
/** Read Trap Program Counter register.
340
 *
318
 *
341
 * @return Current value in TPC.
319
 * @return Current value in TPC.
342
 */
320
 */
343
static inline uint64_t tpc_read(void)
321
static inline uint64_t tpc_read(void)