Re: [RFC, PATCH 4/24] i386 Vmi inline implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 13 March 2006 19:02, Zachary Amsden wrote:

> +#define MAKESTR(x)              #x
> +#define XSTR(x)                 MAKESTR(x)
> +#define XCONC(args...)		args
> +#define CONCSTR(x...)		#x
> +#define XCSTR(x...)		CONCSTR(x)

We have legions of these all over the tree. How about you put
them into some central file and gc a few?


> +/*
> + * Propagate these definitions as strings up to C code for convenient use
> + * in stringized assembler as pseudo-mnemonics; we must emit assembler
> + * directives to generate equates for the VMI_CALL_XXX symbols, since they
> + * will not be available otherwise to the assembler, and we can't emit
> + * the C versions of these functions from within an inline assembler
> + * string.
> + */
> +asm(".equ VMI_CALL_CUR, 0;\n\t");

The standard way to do this is to use asm-offsets.c



> +#define VDEF(call)						\
> +	asm (".equ VMI_CALL_" #call ", VMI_CALL_CUR;\n\t");	\
> +	asm (".equ VMI_CALL_CUR, VMI_CALL_CUR+1;\n\t");
> +VMI_CALLS

Hmmm? This doesn't look like something a header file should be doing.

How about you put that big list and the definition into a .c ?


> +#if defined(CONFIG_VMI_C_CONVENTION)

I don't think that file can be reviewed in any meaningful way before
you don't get rid of the macro mess and the unneeded calling conventions.


-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux