Add compiler testing for always_inline attribute
Add compiler testing for fastcall attribute Add the FASTCALL define to visual c Remove some overkill inline routines Make sure that all the inline routines in headers are static Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3355
This commit is contained in:
parent
5f6236ee35
commit
88caf1dc71
20 changed files with 182 additions and 147 deletions
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: int10.h,v 1.37 2009-04-11 07:58:39 qbix79 Exp $ */
|
||||
/* $Id: int10.h,v 1.38 2009-04-25 16:25:03 harekiet Exp $ */
|
||||
|
||||
#include "vga.h"
|
||||
|
||||
|
@ -146,11 +146,11 @@ typedef struct {
|
|||
|
||||
extern Int10Data int10;
|
||||
|
||||
INLINE Bit8u CURSOR_POS_COL(Bit8u page) {
|
||||
static Bit8u CURSOR_POS_COL(Bit8u page) {
|
||||
return real_readb(BIOSMEM_SEG,BIOSMEM_CURSOR_POS+page*2);
|
||||
}
|
||||
|
||||
INLINE Bit8u CURSOR_POS_ROW(Bit8u page) {
|
||||
static Bit8u CURSOR_POS_ROW(Bit8u page) {
|
||||
return real_readb(BIOSMEM_SEG,BIOSMEM_CURSOR_POS+page*2+1);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: int10_char.cpp,v 1.56 2008-11-09 11:22:03 qbix79 Exp $ */
|
||||
/* $Id: int10_char.cpp,v 1.57 2009-04-25 16:25:03 harekiet Exp $ */
|
||||
|
||||
/* Character displaying moving functions */
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
|||
#include "inout.h"
|
||||
#include "int10.h"
|
||||
|
||||
static INLINE void CGA2_CopyRow(Bit8u cleft,Bit8u cright,Bit8u rold,Bit8u rnew,PhysPt base) {
|
||||
static void CGA2_CopyRow(Bit8u cleft,Bit8u cright,Bit8u rold,Bit8u rnew,PhysPt base) {
|
||||
Bit8u cheight = real_readb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT);
|
||||
PhysPt dest=base+((CurMode->twidth*rnew)*(cheight/2)+cleft);
|
||||
PhysPt src=base+((CurMode->twidth*rold)*(cheight/2)+cleft);
|
||||
|
@ -39,7 +39,7 @@ static INLINE void CGA2_CopyRow(Bit8u cleft,Bit8u cright,Bit8u rold,Bit8u rnew,P
|
|||
}
|
||||
}
|
||||
|
||||
static INLINE void CGA4_CopyRow(Bit8u cleft,Bit8u cright,Bit8u rold,Bit8u rnew,PhysPt base) {
|
||||
static void CGA4_CopyRow(Bit8u cleft,Bit8u cright,Bit8u rold,Bit8u rnew,PhysPt base) {
|
||||
Bit8u cheight = real_readb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT);
|
||||
PhysPt dest=base+((CurMode->twidth*rnew)*(cheight/2)+cleft)*2;
|
||||
PhysPt src=base+((CurMode->twidth*rold)*(cheight/2)+cleft)*2;
|
||||
|
@ -51,7 +51,7 @@ static INLINE void CGA4_CopyRow(Bit8u cleft,Bit8u cright,Bit8u rold,Bit8u rnew,P
|
|||
}
|
||||
}
|
||||
|
||||
static INLINE void TANDY16_CopyRow(Bit8u cleft,Bit8u cright,Bit8u rold,Bit8u rnew,PhysPt base) {
|
||||
static void TANDY16_CopyRow(Bit8u cleft,Bit8u cright,Bit8u rold,Bit8u rnew,PhysPt base) {
|
||||
Bit8u cheight = real_readb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT);
|
||||
PhysPt dest=base+((CurMode->twidth*rnew)*(cheight/4)+cleft)*4;
|
||||
PhysPt src=base+((CurMode->twidth*rold)*(cheight/4)+cleft)*4;
|
||||
|
@ -65,7 +65,7 @@ static INLINE void TANDY16_CopyRow(Bit8u cleft,Bit8u cright,Bit8u rold,Bit8u rne
|
|||
}
|
||||
}
|
||||
|
||||
static INLINE void EGA16_CopyRow(Bit8u cleft,Bit8u cright,Bit8u rold,Bit8u rnew,PhysPt base) {
|
||||
static void EGA16_CopyRow(Bit8u cleft,Bit8u cright,Bit8u rold,Bit8u rnew,PhysPt base) {
|
||||
PhysPt src,dest;Bitu copy;
|
||||
Bit8u cheight = real_readb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT);
|
||||
dest=base+(CurMode->twidth*rnew)*cheight+cleft;
|
||||
|
@ -85,7 +85,7 @@ static INLINE void EGA16_CopyRow(Bit8u cleft,Bit8u cright,Bit8u rold,Bit8u rnew,
|
|||
IO_Write(0x3ce,5);IO_Write(0x3cf,0); /* Normal transfer mode */
|
||||
}
|
||||
|
||||
static INLINE void VGA_CopyRow(Bit8u cleft,Bit8u cright,Bit8u rold,Bit8u rnew,PhysPt base) {
|
||||
static void VGA_CopyRow(Bit8u cleft,Bit8u cright,Bit8u rold,Bit8u rnew,PhysPt base) {
|
||||
PhysPt src,dest;Bitu copy;
|
||||
Bit8u cheight = real_readb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT);
|
||||
dest=base+8*((CurMode->twidth*rnew)*cheight+cleft);
|
||||
|
@ -99,14 +99,14 @@ static INLINE void VGA_CopyRow(Bit8u cleft,Bit8u cright,Bit8u rold,Bit8u rnew,Ph
|
|||
}
|
||||
}
|
||||
|
||||
static INLINE void TEXT_CopyRow(Bit8u cleft,Bit8u cright,Bit8u rold,Bit8u rnew,PhysPt base) {
|
||||
static void TEXT_CopyRow(Bit8u cleft,Bit8u cright,Bit8u rold,Bit8u rnew,PhysPt base) {
|
||||
PhysPt src,dest;
|
||||
src=base+(rold*CurMode->twidth+cleft)*2;
|
||||
dest=base+(rnew*CurMode->twidth+cleft)*2;
|
||||
MEM_BlockCopy(dest,src,(cright-cleft)*2);
|
||||
}
|
||||
|
||||
static INLINE void CGA2_FillRow(Bit8u cleft,Bit8u cright,Bit8u row,PhysPt base,Bit8u attr) {
|
||||
static void CGA2_FillRow(Bit8u cleft,Bit8u cright,Bit8u row,PhysPt base,Bit8u attr) {
|
||||
Bit8u cheight = real_readb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT);
|
||||
PhysPt dest=base+((CurMode->twidth*row)*(cheight/2)+cleft);
|
||||
Bitu copy=(cright-cleft);
|
||||
|
@ -122,7 +122,7 @@ static INLINE void CGA2_FillRow(Bit8u cleft,Bit8u cright,Bit8u row,PhysPt base,B
|
|||
}
|
||||
|
||||
|
||||
static INLINE void CGA4_FillRow(Bit8u cleft,Bit8u cright,Bit8u row,PhysPt base,Bit8u attr) {
|
||||
static void CGA4_FillRow(Bit8u cleft,Bit8u cright,Bit8u row,PhysPt base,Bit8u attr) {
|
||||
Bit8u cheight = real_readb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT);
|
||||
PhysPt dest=base+((CurMode->twidth*row)*(cheight/2)+cleft)*2;
|
||||
Bitu copy=(cright-cleft)*2;Bitu nextline=CurMode->twidth*2;
|
||||
|
@ -136,7 +136,7 @@ static INLINE void CGA4_FillRow(Bit8u cleft,Bit8u cright,Bit8u row,PhysPt base,B
|
|||
}
|
||||
}
|
||||
|
||||
static INLINE void TANDY16_FillRow(Bit8u cleft,Bit8u cright,Bit8u row,PhysPt base,Bit8u attr) {
|
||||
static void TANDY16_FillRow(Bit8u cleft,Bit8u cright,Bit8u row,PhysPt base,Bit8u attr) {
|
||||
Bit8u cheight = real_readb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT);
|
||||
PhysPt dest=base+((CurMode->twidth*row)*(cheight/4)+cleft)*4;
|
||||
Bitu copy=(cright-cleft)*4;Bitu nextline=CurMode->twidth*4;
|
||||
|
@ -152,7 +152,7 @@ static INLINE void TANDY16_FillRow(Bit8u cleft,Bit8u cright,Bit8u row,PhysPt bas
|
|||
}
|
||||
}
|
||||
|
||||
static INLINE void EGA16_FillRow(Bit8u cleft,Bit8u cright,Bit8u row,PhysPt base,Bit8u attr) {
|
||||
static void EGA16_FillRow(Bit8u cleft,Bit8u cright,Bit8u row,PhysPt base,Bit8u attr) {
|
||||
/* Set Bitmask / Color / Full Set Reset */
|
||||
IO_Write(0x3ce,0x8);IO_Write(0x3cf,0xff);
|
||||
IO_Write(0x3ce,0x0);IO_Write(0x3cf,attr);
|
||||
|
@ -169,7 +169,7 @@ static INLINE void EGA16_FillRow(Bit8u cleft,Bit8u cright,Bit8u row,PhysPt base,
|
|||
IO_Write(0x3cf,0);
|
||||
}
|
||||
|
||||
static INLINE void VGA_FillRow(Bit8u cleft,Bit8u cright,Bit8u row,PhysPt base,Bit8u attr) {
|
||||
static void VGA_FillRow(Bit8u cleft,Bit8u cright,Bit8u row,PhysPt base,Bit8u attr) {
|
||||
/* Write some bytes */
|
||||
Bit8u cheight = real_readb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT);
|
||||
PhysPt dest=base+8*((CurMode->twidth*row)*cheight+cleft);
|
||||
|
@ -181,7 +181,7 @@ static INLINE void VGA_FillRow(Bit8u cleft,Bit8u cright,Bit8u row,PhysPt base,Bi
|
|||
}
|
||||
}
|
||||
|
||||
static INLINE void TEXT_FillRow(Bit8u cleft,Bit8u cright,Bit8u row,PhysPt base,Bit8u attr) {
|
||||
static void TEXT_FillRow(Bit8u cleft,Bit8u cright,Bit8u row,PhysPt base,Bit8u attr) {
|
||||
/* Do some filing */
|
||||
PhysPt dest;
|
||||
dest=base+(row*CurMode->twidth+cleft)*2;
|
||||
|
@ -549,7 +549,7 @@ void INT10_WriteChar(Bit8u chr,Bit8u attr,Bit8u page,Bit16u count,bool showattr)
|
|||
}
|
||||
}
|
||||
|
||||
static INLINE void INT10_TeletypeOutputAttr(Bit8u chr,Bit8u attr,bool useattr,Bit8u page) {
|
||||
static void INT10_TeletypeOutputAttr(Bit8u chr,Bit8u attr,bool useattr,Bit8u page) {
|
||||
BIOS_NCOLS;BIOS_NROWS;
|
||||
Bit8u cur_row=CURSOR_POS_ROW(page);
|
||||
Bit8u cur_col=CURSOR_POS_COL(page);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue