Port-i386 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: x86 pcitag_t change proposal/patch
On Thu, Dec 06, 2012 at 10:21:41AM -0600, Jonathan A. Kollasch wrote:
> +
> +union pci_conf_selector {
> + pci_conf_selector_t selector;
> + struct {
> + uint32_t address;
> + } mode1;
> + struct {
> + uint16_t port;
> + uint8_t enable;
> + uint8_t forward;
> + } mode2;
> +};
Given the code, you should be able to do it without the union.
(By just shifting/masking to convert the subfields to an integer.)
Even that might be pointless, since the 32bit structure will be
passed by value in a register (on most modern ABI).
David
--
David Laight: david%l8s.co.uk@localhost
Home |
Main Index |
Thread Index |
Old Index