mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Trojanowski <bart@jukie.net>
To: Manoj Sontakke <manojs@sasken.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: which gcc version?
Date: Thu, 5 Apr 2001 07:37:03 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.30.0104050732080.13246-100000@localhost> (raw)
In-Reply-To: <Pine.LNX.4.21.0104051930580.2687-100000@pcc65.sasi.com>

On Thu, 5 Apr 2001, Manoj Sontakke wrote:

> Addition and subtraction works fine. The problem is with multiplication
> and division. I am doing this to avoid floating point calculation and
> doing fixed point calculation. The rage is large enough to need "long
> long" Any other way to achieve this?

gcc requires a function call to do a mul/div on a long long.  There is no
easy way to do a 64bit op of this type on a 32 bit CPU...

IFF you are making a module that will never be part of the kernel tree you
can get away with adding `gcc -print-libgcc-file-name` to your link line.
And by that I mean:

	${LD} ${LDFLAGS} -o $@ $< `gcc -print-libgcc-file-name`

This is a hack that will link in the __div3 function from glibc into your
module.  NOTE that this will never be done for you in the kernel... so if
you can don't use div or mul on long long.

Cheers,
Bart.

-- 
	WebSig: http://www.jukie.net/~bart/sig/



  reply	other threads:[~2001-04-05 11:43 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-05 10:56 Manoj Sontakke
2001-04-05  5:48 ` Alexander Viro
2001-04-05 14:09   ` Manoj Sontakke
2001-04-05 11:37     ` Bart Trojanowski [this message]
2001-04-05 12:02       ` Matti Aarnio
2001-04-05 12:26       ` David Woodhouse
2001-04-05 12:31         ` Matti Aarnio
2001-04-05 13:09         ` Richard B. Johnson
2001-04-05 11:45     ` Matti Aarnio
2001-04-05 11:50     ` christophe barbe
2001-11-23 12:53 Which " Roy Sigurd Karlsbakk
2001-11-23 12:57 ` Arjan van de Ven
2001-11-23 13:51 ` war
2001-11-23 19:43   ` J Sloan
2001-11-23 13:59 ` Anton Altaparmakov
2001-11-23 14:11   ` war
2001-11-23 15:14     ` Arjan van de Ven
2001-11-23 15:30       ` Gábor Lénárt
2001-11-23 15:34         ` Arjan van de Ven
2001-11-23 19:50         ` J Sloan
2001-11-23 20:34           ` John Jasen
2001-11-23 21:55             ` J Sloan
2001-11-24  3:08               ` John Jasen
2001-11-24 12:24             ` Paul G. Allen
2001-11-26 18:31             ` Alan Cox
2001-11-27  8:42               ` Ahmed Masud
2001-11-23 16:10     ` Anton Altaparmakov
2001-11-23 14:43   ` Anton Altaparmakov
2001-11-23 16:23     ` Jeff Garzik
2001-11-23 18:30   ` Daniel Phillips
2001-11-23 18:56 ` Anton Altaparmakov
2001-11-23 19:28   ` Daniel Phillips
2001-11-23 20:14     ` Andrew Morton
2001-11-23 20:24     ` Anton Altaparmakov
2001-11-23 20:35       ` Andrew Morton
2001-11-23 21:09         ` David Weinehall
2001-11-24 16:01   ` Luigi Genoni
2001-11-24 16:09     ` Daniel Phillips
2001-11-24 17:32       ` Luigi Genoni
2001-11-23 17:12 RaúlNúñez de Arenas Coronado
2001-11-23 18:02 ` M. Edward (Ed) Borasky
2001-11-23 18:14   ` Thorsten Glaser

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=Pine.LNX.4.30.0104050732080.13246-100000@localhost \
    --to=bart@jukie.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manojs@sasken.com \
    /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

all inboxes | Powered by JetHome®