Re: undefined reference to `__divdi3'

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

 



On Sun, 22 Jul 2018 17:48:21 +0530, Himanshu Jha said:

> I am currently working on my GSoC project and while testing through
> 0-day test service, I hit the following error:

>    424  static u32 bme680_compensate_gas(struct bme680_data *data, u16 gas_res_adc,
>    425                                   u8 gas_range)
>    426  {
>    427          struct bme680_calib *calib = &data->bme680;
>    428          s64 var1;
>    429          u64 var2;
>    430          s64 var3;
>    431          u32 calc_gas_res;
>    432
>    433          /* Look up table 1 for the possible gas range values */
>    434          u32 lookupTable1[16] = {2147483647u, 2147483647u, 2147483647u,
>    435                                  2147483647u, 2147483647u, 2126008810u,
>    436                                  2147483647u, 2130303777u, 2147483647u,
>    437                                  2147483647u, 2143188679u, 2136746228u,
>    438                                  2147483647u, 2126008810u, 2147483647u,
>    439                                  2147483647u};

As an aside, making this a 'static u32' will get rid of the mess of mov and movabs
instructions each time.  'static const u32' would be even better, as then the
compiler knows it can optimize assuming it never changes any of the values...

(In addition, with all that initialization out of the picture, figuring out
which  assembler code does what should be easier...

Attachment: pgpXp1mIo0inc.pgp
Description: PGP signature

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux