/[rtmk]/rtmk/i386/i386-regs.h
ViewVC logotype

Diff of /rtmk/i386/i386-regs.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by jrydberg, Mon Jan 7 01:09:57 2002 UTC revision 1.3 by jrydberg, Wed Feb 20 19:07:30 2002 UTC
# Line 1  Line 1 
1  /* CPU register definitions and inline functions.  /* CPU register definitions and inline functions.
2     Copyright 1999, 2000, 2001 Johan Rydberg, jrydberg@opencores.org.     Copyright 1999, 2000, 2001, 2002 Johan Rydberg, jrydberg@opencores.org.
3    
4  This program is free software; you can redistribute it and/or modify  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by  it under the terms of the GNU General Public License as published by
# Line 44  static __inline__ unsigned int get_cr3 ( Line 44  static __inline__ unsigned int get_cr3 (
44    return value;    return value;
45  }  }
46    
47    static __inline__ void set_cr4 (void *cr4)
48    {
49      register unsigned int value = (unsigned int) cr4;
50      __asm__ __volatile__ ("mov %0, %%cr4" :: "r" (value));
51    }
52    
53    static __inline__ unsigned int get_cr4 (void)
54    {
55      register unsigned int value;
56      __asm__ __volatile__ ("mov %%cr4, %0" : "=r" (value));
57      return value;
58    }
59    
60  static __inline__ unsigned int get_esp (void)  static __inline__ unsigned int get_esp (void)
61  {  {
62    register unsigned int value;    register unsigned int value;

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26