From: "Rune Torgersen" <runet@innovsys.com>
To: <linuxppc-embedded@ozlabs.org>
Subject: ucmpdi2 and cmpdi2
Date: Mon, 25 Sep 2006 15:36:46 -0500 [thread overview]
Message-ID: <DCEAAC0833DD314AB0B58112AD99B93B0189DF91@ismail.innsys.innovsys.com> (raw)
Hi
I have a function that does a switch statement on a long long or
unsinged long long and get teh follwing compiler warnings when making a
module:
WARNING: "__ucmpdi2"
[/home/runet/source/hardware_1.1/cpu1/src/drivers/test_bug.ko]
undefined!
WARNING: "__cmpdi2"
[/home/runet/source/hardware_1.1/cpu1/src/drivers/test_bug.ko]
undefined!
And of course it fails to load.
The weird thingis that it works if I instead of using a long long, use a
[u]int64_t.
Is this a compiler error or something else?
gcc version: powerpc-604-linux-gnu-gcc (GCC) 3.4.3
target CPU: Freescale 826x.
Here is my module source:
#ifndef __KERNEL__
# define __KERNEL__
#endif
#ifndef MODULE
# define MODULE
#endif
#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h> /* printk() */
#include <linux/types.h> /* size_t */
#include <linux/ctype.h>
void TestFunc(char val)
{
long long t1;
unsigned long long t2;
=20
t1 =3D 0x100;
t2 =3D 0x200;
switch(t1)
{
case 0x01:=20
printk("c1\n");
break; =20
default:
printk("def1\n");
break;
}
switch(t2)
{
case 0x02:=20
printk("c2\n");
break; =20
default:
printk("def2\n");
break;
}
}
static int __init tmp_init_module(void)
{
return 0;
}
static void __exit tmp_cleanup_module(void)
{
}
module_init(tmp_init_module);
module_exit(tmp_cleanup_module);
reply other threads:[~2006-09-25 20:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=DCEAAC0833DD314AB0B58112AD99B93B0189DF91@ismail.innsys.innovsys.com \
--to=runet@innovsys.com \
--cc=linuxppc-embedded@ozlabs.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