Remove assembly coded log2 function

As we move to supporting other systems we need to get rid of assembly
where we can. The log2 function in src/lib is identical to the assembly
one (tested for all 32-bit signed integers :-) and takes about 10 ns
to run as opposed to 5ns for the non-portable assembly version. While speed
is good, I think we can spare the 15 ns or so we add to boot time
by using the C version only.

Change-Id: Icafa565eae282c85fa5fc01b3bd1f110cd9aaa91
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-on: http://review.coreboot.org/1928
Tested-by: build bot (Jenkins)
This commit is contained in:
Ronald G. Minnich 2012-11-27 11:32:38 -08:00
parent acf443191b
commit 5079a0d32f
99 changed files with 15 additions and 118 deletions

View File

@ -1,20 +0,0 @@
#ifndef I386_BITOPS_H
#define I386_BITOPS_H
/**
* log2 - Find the truncated log base 2 of x
*/
static inline unsigned long log2(unsigned long x)
{
unsigned long r = 0;
__asm__(
"bsrl %1, %0\n\t"
"jnz 1f\n\t"
"movl $-1, %0\n\t"
"1:\n\t"
: "=r" (r) : "r" (x));
return r;
}
#endif /* I386_BITOPS_H */

View File

@ -6,7 +6,6 @@
#include <device/pci_ids.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <cpu/amd/gx2def.h>
#include <cpu/x86/msr.h>
#include <cpu/x86/cache.h>

View File

@ -26,7 +26,6 @@
#include <device/device.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <cpu/x86/msr.h>
#include <cpu/amd/lxdef.h>

View File

@ -12,7 +12,6 @@
#include <device/hypertransport.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <delay.h>
/*

View File

@ -33,7 +33,6 @@
*/
#include <console/console.h>
#include <bitops.h>
#include <arch/io.h>
#include <device/device.h>
#include <device/pci.h>

View File

@ -23,7 +23,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <bitops.h>
#include <lib.h>
#include <console/console.h>
#include <device/device.h>
#include <device/path.h>

View File

@ -26,7 +26,6 @@
#include <console/console.h>
#include <stdlib.h>
#include <stdint.h>
#include <bitops.h>
#include <string.h>
#include <arch/io.h>
#include <device/device.h>

View File

@ -24,7 +24,6 @@
#include <console/console.h>
#include <stdlib.h>
#include <stdint.h>
#include <bitops.h>
#include <string.h>
#include <arch/io.h>
#include <device/device.h>

View File

@ -7,7 +7,6 @@
#include <device/pci.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <delay.h>
#include <smbios.h>

View File

@ -26,7 +26,7 @@
#include <device/hypertransport.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <lib.h>
#include <cpu/cpu.h>
#include <cpu/x86/lapic.h>
#include <cbmem.h>

View File

@ -26,7 +26,7 @@
#include <device/hypertransport.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <lib.h>
#include <cpu/cpu.h>
#include <cbmem.h>

View File

@ -26,7 +26,7 @@
#include <device/hypertransport.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <lib.h>
#include <cpu/cpu.h>
#include <cbmem.h>

View File

@ -26,7 +26,7 @@
#include <device/hypertransport.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <lib.h>
#include <cpu/cpu.h>
#include <cbmem.h>

View File

@ -26,7 +26,7 @@
#include <device/hypertransport.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <lib.h>
#include <cpu/cpu.h>
#include <cbmem.h>

View File

@ -31,7 +31,7 @@
#include <device/pci_ids.h>
#include <device/pci_ops.h>
#include <pc80/mc146818rtc.h>
#include <bitops.h>
#include <lib.h>
#include <cpu/amd/model_10xxx_rev.h>
#include "amdfam10.h"

View File

@ -26,7 +26,7 @@
#include <device/hypertransport.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <lib.h>
#include <cpu/cpu.h>
#include <cpu/x86/lapic.h>

View File

@ -16,7 +16,7 @@
#include <device/pci_ops.h>
#include <reset.h>
#include <pc80/mc146818rtc.h>
#include <bitops.h>
#include <lib.h>
#include <cpu/amd/model_fxx_rev.h>
#include "amdk8.h"

View File

@ -14,7 +14,7 @@
#include <device/hypertransport.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <lib.h>
#include <cpu/cpu.h>
#include <cpu/x86/lapic.h>

View File

@ -6,7 +6,6 @@
#include <device/pci_ids.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include "northbridge.h"
#include <cpu/amd/gx1def.h>
#include <cpu/x86/cache.h>

View File

@ -26,7 +26,6 @@
#include <device/pci_ids.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include "northbridge.h"
#include <cpu/x86/msr.h>
#include <cpu/x86/cache.h>

View File

@ -26,7 +26,6 @@
#include <device/pci_ids.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include "northbridge.h"
#include <cpu/amd/gx2def.h>
#include <cpu/x86/msr.h>

View File

@ -26,7 +26,6 @@
#include <device/pci_ids.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <cpu/cpu.h>
#include <cpu/amd/lxdef.h>
#include <cpu/x86/msr.h>

View File

@ -26,7 +26,6 @@
#include <device/pci_ids.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include "northbridge.h"
#include <cpu/amd/lxdef.h>
#include <cpu/x86/msr.h>

View File

@ -6,7 +6,6 @@
#include <cpu/cpu.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#if CONFIG_WRITE_HIGH_TABLES
#include <cbmem.h>

View File

@ -6,7 +6,6 @@
#include <cpu/cpu.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include "e7505.h"
#if CONFIG_WRITE_HIGH_TABLES

View File

@ -7,7 +7,6 @@
#include <device/hypertransport.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <cpu/cpu.h>
#include "chip.h"
#include "northbridge.h"

View File

@ -7,7 +7,6 @@
#include <device/hypertransport.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <cpu/cpu.h>
#include "chip.h"
#include "northbridge.h"

View File

@ -26,7 +26,6 @@
#include <device/hypertransport.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <cpu/cpu.h>
#include <boot/tables.h>
#include <arch/acpi.h>

View File

@ -29,7 +29,6 @@
#include <device/hypertransport.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <cpu/cpu.h>
#include "chip.h"
#include "i3100.h"

View File

@ -6,7 +6,6 @@
#include <device/pci_ids.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <cpu/cpu.h>
#include <pc80/keyboard.h>
#include "northbridge.h"

View File

@ -27,7 +27,6 @@
#include <device/pci_ids.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <cpu/cpu.h>
#include <pc80/keyboard.h>
#include "northbridge.h"

View File

@ -25,7 +25,6 @@
#include <device/pci_ids.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <cpu/cpu.h>
#include <arch/acpi.h>
#include <cbmem.h>

View File

@ -27,7 +27,6 @@
#include <device/pci_ids.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <cpu/cpu.h>
#include "northbridge.h"
#include "i82810.h"

View File

@ -27,7 +27,6 @@
#include <cpu/cpu.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include "i82830.h"
static void northbridge_init(device_t dev)

View File

@ -28,7 +28,6 @@
#include <device/pci_ids.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <cpu/x86/cache.h>
#include <cpu/cpu.h>

View File

@ -26,7 +26,6 @@
#include <device/hypertransport.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <cpu/cpu.h>
#include <arch/acpi.h>
#include "i945.h"

View File

@ -31,7 +31,6 @@
#include <device/hypertransport.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <cpu/cpu.h>
#include <cbmem.h>
#include "chip.h"

View File

@ -26,7 +26,6 @@
#include <device/hypertransport.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <cpu/cpu.h>
#include <arch/acpi.h>
#include "sch.h"

View File

@ -28,7 +28,6 @@
#include <device/pci_ids.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <smbios.h>
#if CONFIG_WRITE_HIGH_TABLES

View File

@ -28,7 +28,7 @@
#include <device/pci_ids.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <lib.h>
#include <cpu/cpu.h>
#include "northbridge.h"
#include "cn400.h"

View File

@ -31,7 +31,6 @@
#include <device/pci_ids.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <cpu/cpu.h>
#include <arch/interrupt.h>
#include "northbridge.h"

View File

@ -28,7 +28,7 @@
#include <device/pci_ids.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <lib.h>
#include <cpu/cpu.h>
#include "northbridge.h"
#include "cn700.h"

View File

@ -31,7 +31,6 @@
#include <device/pci_ids.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <cpu/cpu.h>
#include <arch/interrupt.h>
#include "northbridge.h"

View File

@ -26,7 +26,6 @@
#include <device/pci_ids.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <cpu/cpu.h>
#include <cpu/x86/mtrr.h>

View File

@ -25,7 +25,6 @@
#include <device/pci_ids.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <cpu/cpu.h>
#include <cpu/x86/mtrr.h>
#include <cpu/x86/msr.h>

View File

@ -8,7 +8,6 @@
#include <cpu/cpu.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include "northbridge.h"
/*

View File

@ -7,7 +7,6 @@
#include <device/pci_ids.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <cpu/cpu.h>
#include <cpu/x86/mtrr.h>
#include <cpu/x86/msr.h>

View File

@ -25,7 +25,6 @@
#include <device/pci_ids.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <cpu/cpu.h>
#include <cpu/x86/mtrr.h>
#include <cpu/x86/msr.h>

View File

@ -29,7 +29,6 @@
#include <device/pci_ids.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <cpu/cpu.h>
#include "vx800.h"

View File

@ -28,7 +28,6 @@
#include <device/pci_ids.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include <cpu/cpu.h>
#include <cpu/x86/mtrr.h>
#include <cpu/x86/msr.h>

View File

@ -25,7 +25,6 @@
#include <device/pci_ops.h>
#include <pc80/mc146818rtc.h>
#include <pc80/isa-dma.h>
#include <bitops.h>
#include <arch/io.h>
#include "hudson.h"

View File

@ -24,7 +24,6 @@
#include <device/pci_ops.h>
#include <device/smbus.h>
#include <pc80/mc146818rtc.h>
#include <bitops.h>
#include <arch/io.h>
#include <cpu/x86/lapic.h>
#include <arch/ioapic.h>

View File

@ -5,7 +5,7 @@
#include <device/pci_ops.h>
#include <device/smbus.h>
#include <pc80/mc146818rtc.h>
#include <bitops.h>
#include <lib.h>
#include <arch/io.h>
#include "amd8111.h"
#include "amd8111_smbus.h"

View File

@ -19,7 +19,6 @@
#include <device/pci.h>
#include "lpc.h"
#include <bitops.h>
#include <arch/io.h>
#include <arch/ioapic.h>
#include <console/console.h> /* printk */

View File

@ -21,7 +21,6 @@
#include <device/pci.h>
#include <arch/ioapic.h>
#include "lpc.h"
#include <bitops.h>
#include <arch/io.h>
#include <cbmem.h>

View File

@ -6,7 +6,6 @@
#include <device/pci_ids.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
#include "chip.h"
#include "northbridge/amd/gx2/northbridge.h"
#include <cpu/amd/gx2def.h>

View File

@ -25,7 +25,6 @@
#include <device/pci_ops.h>
#include <pc80/mc146818rtc.h>
#include <pc80/isa-dma.h>
#include <bitops.h>
#include <arch/io.h>
#include <arch/ioapic.h>
#include "sb600.h"

View File

@ -24,7 +24,6 @@
#include <device/pci_ops.h>
#include <device/smbus.h>
#include <pc80/mc146818rtc.h>
#include <bitops.h>
#include <arch/io.h>
#include <cpu/x86/lapic.h>
#include <arch/ioapic.h>

View File

@ -25,7 +25,6 @@
#include <device/pci_ops.h>
#include <pc80/mc146818rtc.h>
#include <pc80/isa-dma.h>
#include <bitops.h>
#include <arch/io.h>
#include <arch/ioapic.h>
#include <cbmem.h>

View File

@ -24,7 +24,6 @@
#include <device/pci_ops.h>
#include <device/smbus.h>
#include <pc80/mc146818rtc.h>
#include <bitops.h>
#include <arch/io.h>
#include <cpu/x86/lapic.h>
#include <arch/ioapic.h>

View File

@ -25,7 +25,6 @@
#include <device/pci_ops.h>
#include <pc80/mc146818rtc.h>
#include <pc80/isa-dma.h>
#include <bitops.h>
#include <arch/io.h>
#include "sb800.h"

View File

@ -24,7 +24,6 @@
#include <device/pci_ops.h>
#include <device/smbus.h>
#include <pc80/mc146818rtc.h>
#include <bitops.h>
#include <arch/io.h>
#include <cpu/x86/lapic.h>
#include <arch/ioapic.h>

View File

@ -26,7 +26,6 @@
#include <device/pci_ops.h>
#include <pc80/mc146818rtc.h>
#include <pc80/isa-dma.h>
#include <bitops.h>
#include <arch/io.h>
#include <arch/ioapic.h>
#include "bcm5785.h"

View File

@ -26,7 +26,6 @@
#include <device/pci_ops.h>
#include <pc80/mc146818rtc.h>
#include <pc80/isa-dma.h>
#include <bitops.h>
#include <arch/io.h>
#include <device/smbus.h>
#include "bcm5785.h"

View File

@ -28,7 +28,6 @@
#include <device/pci_ops.h>
#include <pc80/mc146818rtc.h>
#include <pc80/isa-dma.h>
#include <bitops.h>
#include <arch/io.h>
#include <arch/ioapic.h>
#include <cpu/x86/lapic.h>

View File

@ -24,7 +24,6 @@
#include <device/pci_ids.h>
#include <device/pci_ops.h>
#include <device/smbus.h>
#include <bitops.h>
#include <arch/io.h>
#include "ck804.h"
#include "smbus.h"

View File

@ -31,7 +31,6 @@
#include <device/pci_ops.h>
#include <pc80/mc146818rtc.h>
#include <pc80/isa-dma.h>
#include <bitops.h>
#include <arch/io.h>
#include <arch/ioapic.h>
#include <cpu/x86/lapic.h>

View File

@ -27,7 +27,6 @@
#include <device/pci_ids.h>
#include <device/pci_ops.h>
#include <device/smbus.h>
#include <bitops.h>
#include <arch/io.h>
#include "mcp55.h"
#include "smbus.h"

View File

@ -33,7 +33,6 @@
#include <device/pci_ops.h>
#include <pc80/mc146818rtc.h>
#include <pc80/isa-dma.h>
#include <bitops.h>
#include <arch/io.h>
#include <arch/ioapic.h>
#include <cpu/x86/lapic.h>

View File

@ -37,7 +37,6 @@
#include <device/pci_ids.h>
#include <device/pci_ops.h>
#include <pc80/mc146818rtc.h>
#include <bitops.h>
#include <cpu/amd/model_fxx_rev.h>
#include <arch/io.h>

View File

@ -25,7 +25,7 @@
#include <cpu/x86/msr.h>
#include <cpu/amd/mtrr.h>
#include <pc80/mc146818rtc.h>
#include <bitops.h>
#include <lib.h>
#include "k8x8xx.h"
static void dram_enable(struct device *dev)

View File

@ -24,7 +24,6 @@
#include <device/pnp.h>
#include <console/console.h>
#include <string.h>
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
#include <stdlib.h>

View File

@ -24,7 +24,6 @@
#include <device/pnp.h>
#include <console/console.h>
#include <string.h>
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
#include <stdlib.h>

View File

@ -24,7 +24,6 @@
#include <device/pnp.h>
#include <console/console.h>
#include <string.h>
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
#include <stdlib.h>

View File

@ -24,7 +24,6 @@
#include <device/pnp.h>
#include <console/console.h>
#include <string.h>
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
#include <stdlib.h>

View File

@ -23,7 +23,6 @@
#include <device/pnp.h>
#include <console/console.h>
#include <string.h>
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
#include <stdlib.h>

View File

@ -23,7 +23,6 @@
#include <device/pnp.h>
#include <console/console.h>
#include <string.h>
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
#include <stdlib.h>

View File

@ -23,7 +23,6 @@
#include <device/pnp.h>
#include <console/console.h>
#include <string.h>
#include <bitops.h>
#include <uart8250.h>
#include <stdlib.h>
#include "pc87392.h"

View File

@ -25,7 +25,6 @@
#include <device/pnp.h>
#include <console/console.h>
#include <string.h>
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
#include <stdlib.h>

View File

@ -24,7 +24,6 @@
#include <device/pnp.h>
#include <console/console.h>
#include <string.h>
#include <bitops.h>
#include <stdlib.h>
#include "chip.h"
#include "pc87427.h"

View File

@ -23,7 +23,6 @@
#include <device/pnp.h>
#include <console/console.h>
#include <string.h>
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
#include <stdlib.h>

View File

@ -23,7 +23,6 @@
#include <console/console.h>
#include <device/smbus.h>
#include <string.h>
#include <bitops.h>
#include <uart8250.h>
#include <assert.h>
#include <stdlib.h>

View File

@ -25,7 +25,6 @@
#include <console/console.h>
#include <device/smbus.h>
#include <string.h>
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
#include <stdlib.h>

View File

@ -29,7 +29,6 @@
#include <console/console.h>
#include <device/smbus.h>
#include <string.h>
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
#include <stdlib.h>

View File

@ -26,7 +26,6 @@
#include <console/console.h>
#include <device/smbus.h>
#include <string.h>
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
#include <stdlib.h>

View File

@ -28,7 +28,6 @@
#include <console/console.h>
#include <device/smbus.h>
#include <string.h>
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
#include <stdlib.h>

View File

@ -25,7 +25,6 @@
#include <console/console.h>
#include <device/smbus.h>
#include <string.h>
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
#include <stdlib.h>

View File

@ -29,7 +29,6 @@
#include <console/console.h>
#include <device/smbus.h>
#include <string.h>
#include <bitops.h>
#include <uart8250.h>
#include <assert.h>
#include <stdlib.h>

View File

@ -26,7 +26,6 @@
#include <console/console.h>
#include <device/smbus.h>
#include <string.h>
#include <bitops.h>
#include <uart8250.h>
#include <assert.h>
#include <stdlib.h>

View File

@ -25,7 +25,6 @@
#include <console/console.h>
#include <device/smbus.h>
#include <string.h>
#include <bitops.h>
#include <pc80/keyboard.h>
#include <stdlib.h>
#include "chip.h"

View File

@ -25,7 +25,6 @@
#include <console/console.h>
#include <device/smbus.h>
#include <string.h>
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
#include <stdlib.h>

View File

@ -25,7 +25,6 @@
#include <console/console.h>
#include <device/smbus.h>
#include <string.h>
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
#include <stdlib.h>

View File

@ -26,7 +26,6 @@
#include <device/pnp.h>
#include <console/console.h>
#include <string.h>
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
#include <pc80/mc146818rtc.h>

View File

@ -26,7 +26,6 @@
#include <device/pnp.h>
#include <console/console.h>
#include <string.h>
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
#include <pc80/mc146818rtc.h>

View File

@ -25,7 +25,6 @@
#include <device/pnp.h>
#include <console/console.h>
#include <string.h>
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
#include "chip.h"

View File

@ -25,7 +25,6 @@
#include <string.h>
#include <stdint.h>
#include <stdlib.h>
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
#include "chip.h"

View File

@ -23,7 +23,7 @@
#include <device/pnp.h>
#include <console/console.h>
#include <string.h>
#include <bitops.h>
#include <lib.h>
#include <uart8250.h>
#include <pc80/mc146818rtc.h>
#include <stdlib.h>

View File

@ -23,7 +23,6 @@
#include <device/pnp.h>
#include <console/console.h>
#include <string.h>
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
#include <stdlib.h>

View File

@ -25,7 +25,6 @@
#include <device/pnp.h>
#include <console/console.h>
#include <string.h>
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
#include <stdlib.h>