Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

asm.h File Reference

#include "types.h"

Include dependency graph for asm.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define COMMON(x)
#define memcpy(t, f, n)
#define __constant_count_memset(s, c, count)   __memset_generic((s),(c),(count))
#define COMMON(x)
#define __constant_c_x_memset(s, c, count)
#define __memset(s, c, count)
#define __HAVE_ARCH_MEMSET
#define memset(s, c, count)

Functions

void enable_interrupts ()
void disable_interrupts ()
bool atomic_test_and_set (bool &target)
unsigned long long system_cycles ()
unsigned system_milliseconds (unsigned cycles_per_millisecond)
void outb (unsigned short int value, unsigned port)
unsigned char inb (unsigned port)
int strcmp (const char *cs, const char *ct)
int strncmp (const char *cs, const char *ct, Size count)
Size strlen (const char *s)
void * __memcpy (void *to, const void *from, Size n)
void * __constant_memcpy (void *to, const void *from, Size n)
void * memmove (void *dest, const void *src, Size n)
void * __memset_generic (void *s, char c, Size count)
void * __constant_c_memset (void *s, unsigned long c, Size count)
void * __constant_c_and_count_memset (void *s, unsigned long pattern, Size count)


Define Documentation

#define __constant_c_x_memset s,
c,
count   ) 
 

Value:

(__builtin_constant_p(count) ? \
 __constant_c_and_count_memset((s),(c),(count)) : \
 __constant_c_memset((s),(c),(count)))

#define __constant_count_memset s,
c,
count   )     __memset_generic((s),(c),(count))
 

#define __HAVE_ARCH_MEMSET
 

#define __memset s,
c,
count   ) 
 

Value:

(__builtin_constant_p(count) ? \
 __constant_count_memset((s),(c),(count)) : \
 __memset_generic((s),(c),(count)))

#define COMMON  ) 
 

Value:

__asm__  __volatile__( \
  "rep ; stosl" \
  x \
  : "=&c" (d0), "=&D" (d1) \
  : "a" (pattern),"0" (count/4),"1" ((long) s) \
  : "memory")

#define COMMON  ) 
 

Value:

__asm__ __volatile__( \
  "rep ; movsl" \
  x \
  : "=&c" (d0), "=&D" (d1), "=&S" (d2) \
  : "0" (n/4),"1" ((long) to),"2" ((long) from) \
  : "memory");

#define memcpy t,
f,
 ) 
 

Value:

(__builtin_constant_p(n) ? \
 __constant_memcpy((t),(f),(n)) : \
 __memcpy((t),(f),(n)))

#define memset s,
c,
count   ) 
 

Value:

(__builtin_constant_p(c) ? \
 __constant_c_x_memset((s),(0x01010101UL*(unsigned char)(c)),(count)) : \
 __memset((s),(c),(count)))


Function Documentation

void* __constant_c_and_count_memset void *  s,
unsigned long  pattern,
Size  count
[inline, static]
 

void* __constant_c_memset void *  s,
unsigned long  c,
Size  count
[inline, static]
 

void* __constant_memcpy void *  to,
const void *  from,
Size  n
[inline, static]
 

void* __memcpy void *  to,
const void *  from,
Size  n
[inline, static]
 

void* __memset_generic void *  s,
char  c,
Size  count
[inline, static]
 

bool atomic_test_and_set bool &  target  )  [inline]
 

void disable_interrupts  )  [inline]
 

void enable_interrupts  )  [inline]
 

unsigned char inb unsigned  port  )  [inline]
 

void* memmove void *  dest,
const void *  src,
Size  n
[inline, static]
 

void outb unsigned short int  value,
unsigned  port
[inline]
 

int strcmp const char *  cs,
const char *  ct
[inline, static]
 

Size strlen const char *  s  )  [inline, static]
 

int strncmp const char *  cs,
const char *  ct,
Size  count
[inline, static]
 

unsigned long long system_cycles  )  [inline]
 

unsigned system_milliseconds unsigned  cycles_per_millisecond  )  [inline]
 


Torsion Operating System, Copyright (C) 2000-2004 Dan Helfman