Skip to content

Commit

Permalink
kernel | x86.h: use more specific address types for rdr{i,s}p(), as p…
Browse files Browse the repository at this point in the history
…er review

Signed-off-by: Kosyrev Serge <[email protected]>
  • Loading branch information
Kosyrev Serge committed Jan 12, 2017
1 parent ba95644 commit 5040d46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/include/arch/x86/x86.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@

#ifndef __ASSEMBLER__

static inline uint64_t __attribute__((always_inline)) rdrip(void)
static inline lvaddr_t __attribute__((always_inline)) rdrip(void)
{
uint64_t rip;
__asm__ ("leaq 0(%%rip), %0\n\t" : "=g" (rip) : /* no input */ : /* no clobber */ );
return rip;
}

static inline uint64_t __attribute__((always_inline)) rdrsp(void)
static inline lvaddr_t __attribute__((always_inline)) rdrsp(void)
{
uint64_t rsp;
__asm__ ("mov %%rsp, %0\n\t" : "=g" (rsp) : /* no input */ : /* no clobber */ );
Expand Down

0 comments on commit 5040d46

Please sign in to comment.