From: valdis.kletnieks@vt.edu (valdis.kletnieks at vt.edu)
To: kernelnewbies@lists.kernelnewbies.org
Subject: undefined reference to `__divdi3'
Date: Mon, 23 Jul 2018 13:41:24 -0400 [thread overview]
Message-ID: <18289.1532367684@turing-police.cc.vt.edu> (raw)
In-Reply-To: <20180722121820.GA15392@himanshu-Vostro-3559>
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...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 486 bytes
Desc: not available
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180723/27536e06/attachment.sig>
prev parent reply other threads:[~2018-07-23 17:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-22 12:18 undefined reference to `__divdi3' Himanshu Jha
[not found] ` <CACnJAqP9JKzzg+dxsyLjfZ+Y5qp=APmjrqNKHbbTBjeF5U_kqQ@mail.gmail.com>
2018-07-22 19:27 ` Himanshu Jha
2018-07-23 17:41 ` valdis.kletnieks at vt.edu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=18289.1532367684@turing-police.cc.vt.edu \
--to=valdis.kletnieks@vt.edu \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).