Module Name:    src
Committed By:   joerg
Date:           Thu Jun 16 13:44:56 UTC 2011

Modified Files:
        src/sys/lib/libsa: stand.h

Log Message:
Add an optional MD calling convention flag for use in libsa when space
optimisation is critical. Use this on i386 to switch to register passing
calling convention for the file system entry points and most assembler
call backs that have to preserve at least 3 registers.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/lib/libsa/stand.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/lib/libsa/stand.h
diff -u src/sys/lib/libsa/stand.h:1.71 src/sys/lib/libsa/stand.h:1.72
--- src/sys/lib/libsa/stand.h:1.71	Fri Feb 25 00:17:36 2011
+++ src/sys/lib/libsa/stand.h	Thu Jun 16 13:44:56 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: stand.h,v 1.71 2011/02/25 00:17:36 joerg Exp $	*/
+/*	$NetBSD: stand.h,v 1.72 2011/06/16 13:44:56 joerg Exp $	*/
 
 /*
  * Copyright (c) 1999 Christopher G. Demetriou.  All rights reserved.
@@ -87,14 +87,14 @@
 struct open_file;
 
 #define FS_DEF(fs) \
-	extern int	__CONCAT(fs,_open)(const char *, struct open_file *); \
-	extern int	__CONCAT(fs,_close)(struct open_file *); \
-	extern int	__CONCAT(fs,_read)(struct open_file *, void *, \
+	extern __compactcall int	__CONCAT(fs,_open)(const char *, struct open_file *); \
+	extern __compactcall int	__CONCAT(fs,_close)(struct open_file *); \
+	extern __compactcall int	__CONCAT(fs,_read)(struct open_file *, void *, \
 						size_t, size_t *); \
-	extern int	__CONCAT(fs,_write)(struct open_file *, void *, \
+	extern __compactcall int	__CONCAT(fs,_write)(struct open_file *, void *, \
 						size_t, size_t *); \
-	extern off_t	__CONCAT(fs,_seek)(struct open_file *, off_t, int); \
-	extern int	__CONCAT(fs,_stat)(struct open_file *, struct stat *)
+	extern __compactcall off_t	__CONCAT(fs,_seek)(struct open_file *, off_t, int); \
+	extern __compactcall int	__CONCAT(fs,_stat)(struct open_file *, struct stat *)
 
 /*
  * This structure is used to define file system operations in a file system
@@ -105,12 +105,12 @@
 
 #if !defined(LIBSA_SINGLE_FILESYSTEM)
 struct fs_ops {
-	int	(*open)(const char *, struct open_file *);
-	int	(*close)(struct open_file *);
-	int	(*read)(struct open_file *, void *, size_t, size_t *);
-	int	(*write)(struct open_file *, void *, size_t size, size_t *);
-	off_t	(*seek)(struct open_file *, off_t, int);
-	int	(*stat)(struct open_file *, struct stat *);
+	__compactcall int	(*open)(const char *, struct open_file *);
+	__compactcall int	(*close)(struct open_file *);
+	__compactcall int	(*read)(struct open_file *, void *, size_t, size_t *);
+	__compactcall int	(*write)(struct open_file *, void *, size_t size, size_t *);
+	__compactcall off_t	(*seek)(struct open_file *, off_t, int);
+	__compactcall int	(*stat)(struct open_file *, struct stat *);
 };
 
 extern struct fs_ops file_system[];
@@ -215,8 +215,8 @@
 #ifdef HEAP_VARIABLE
 void	setheap(void *, void *);
 #endif
-void	*alloc(size_t);
-void	dealloc(void *, size_t);
+void	*alloc(size_t) __compactcall;
+void	dealloc(void *, size_t) __compactcall;
 struct	disklabel;
 char	*getdisklabel(const char *, struct disklabel *);
 int	dkcksum(const struct disklabel *);

Reply via email to