Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: operand out of range (260 is not between -256 and 255) #21

Closed
Chen-Gang opened this issue Oct 27, 2013 · 26 comments
Closed

Error: operand out of range (260 is not between -256 and 255) #21

Chen-Gang opened this issue Oct 27, 2013 · 26 comments
Assignees
Labels

Comments

@Chen-Gang
Copy link

For Public Linux kernel next-20130927 tree, it will cause linking issue.

The related operation:

make ARCH=arc CROSS_COMPILE=/usr/local/bin/arc-elf32- allmodconfig
make ARCH=arc CROSS_COMPILE=/usr/local/bin/arc-elf32-

The related error:

CC [M] sound/soc/codecs/wm8962.o
{standard input}: Assembler messages:
{standard input}:243: Error: operand out of range (260 is not between -256 and 255)

The related information:

[root@gchenlinux linux-next]# arc-elf32-as -v
GNU assembler version 2.23.2 (arc-elf32) using BFD version (GNU Binutils) 2.23.2

[root@gchenlinux linux-next]# arc-elf32-ld -v
GNU ld (GNU Binutils) 2.23.2

[root@gchenlinux linux-next]# arc-elf32-gcc -v
Using built-in specs.
COLLECT_GCC=arc-elf32-gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/arc-elf32/4.8.0/lto-wrapper
Target: arc-elf32
Configured with: ../gcc/configure --without-header --disable-nls --enable-language=c --disable-threads --disable-shared --enable-werror=no target_configargs=enable_vtable_verify=yes --target=arc-elf32 --with-cpu=arc700 : (reconfigured) ../gcc/configure --disable-nls --enable-language=c --disable-threads --disable-shared --enable-werror=no target_configargs=enable_vtable_verify=yes --target=arc-elf32 --with-cpu=arc700 : (reconfigured) ../gcc/configure --without-header --disable-nls --enable-language=c --disable-threads --disable-shared --enable-werror=no target_configargs=enable_vtable_verify=yes --target=arc-elf32 --with-cpu=arc700 --disable-multilib --with-headers=../newlib/newlib/libc/include
Thread model: single
gcc version 4.8.0 (GCC)

@Chen-Gang
Copy link
Author

It is for wm8962_readable_register() in sound/soc/codecs/wm8962.c, it is a very simple function but contents 600+ cases (all are empty and only fall through to "return true") within switch statement.

After remove most of these empty cases, can pass compiling.

@Chen-Gang
Copy link
Author

Oh, sorry, for related operation, I also disable CONFIG_CC_OPTIMIZE_FOR_SIZE for building kernel, and pass -mmedium-calls to arc-elf32-gcc.

@ghost ghost assigned simonpcook Oct 30, 2013
@jeremybennett
Copy link
Contributor

I suspect this is a problem with the compiler generating invalid assembler, rather than a fault in the assembler itself. The ARC assembler does not have relaxation, so cannot resolve these problems for itself. It is up to the compiler to get things right.

I'll ask Joern Rennecke (GCC expert) to take a look.

@Chen-Gang
Copy link
Author

On 10/31/2013 05:44 PM, Jeremy Bennett wrote:

I suspect this is a problem with the compiler generating invalid
assembler, rather than a fault in the assembler itself. The ARC
assembler does not have relaxation, so cannot resolve these problems for
itself. It is up to the compiler to get things right.

I'll ask Joern Rennecke (GCC expert) to take a look.

OK, thank you very much. :-)


Reply to this email directly or view it on GitHub
#21 (comment).

Chen Gang

@amylaar
Copy link
Contributor

amylaar commented Oct 31, 2013

This might be a bug in GCC in the branch shortening, or it might be an assembler bug, choosing an instruction
with a LIMM when it shouldn't.

Could you please provide the pre-processed sources with the exact compilation flags to reproduce the problem?

@claziss
Copy link

claziss commented Oct 31, 2013

I did solve some issues related to branch shortening in dev branch please rerun your example with it and let me know if you see the issue again.

@Chen-Gang
Copy link
Author

On 11/01/2013 12:49 AM, amylaar wrote:

This might be a bug in GCC in the branch shortening, or it might be an
assembler bug, choosing an instruction
with a LIMM when it shouldn't.

Could you please provide the pre-processed sources with the exact
compilation flags to reproduce the problem?

OK, I will/should provide, I will try to finish within this week
(2013-11-03), although I am not quite sure (I have to do another things).

But at least, I should finish within next week (2013-10-10).

Thanks.

Chen Gang

@Chen-Gang
Copy link
Author

On 11/01/2013 01:02 AM, Claudiu Zissulescu wrote:

I did solve some issues related to branch shortening in dev branch
please rerun your example with it and let me know if you see the issue
again.

It sounds reasonable to me. I will try to use the develop tree.

THanks.

Chen Gang

@Chen-Gang
Copy link
Author

On 11/01/2013 09:33 AM, Chen Gang wrote:

On 11/01/2013 01:02 AM, Claudiu Zissulescu wrote:

I did solve some issues related to branch shortening in dev branch
please rerun your example with it and let me know if you see the issue
again.

For gcc issue #26, arc-gcc-4.8-dev will be OK.

So I leave a comment and close it. :-)

It sounds reasonable to me. I will try to use the develop tree.

THanks.

Thanks.

Chen Gang

@Chen-Gang
Copy link
Author

On 11/01/2013 11:58 AM, Chen Gang wrote:

On 11/01/2013 11:52 AM, Chen Gang wrote:

On 11/01/2013 09:33 AM, Chen Gang wrote:

On 11/01/2013 01:02 AM, Claudiu Zissulescu wrote:

I did solve some issues related to branch shortening in dev branch
please rerun your example with it and let me know if you see the issue
again.

And for #27 is also OK -- can not cause issue again.

It seems, originally, I used an incorrect version for building kernel. :-(

For gcc issue #26, arc-gcc-4.8-dev will be OK.

So I leave a comment and close it. :-)

It sounds reasonable to me. I will try to use the develop tree.

But for this version, it will cause another issue (it can be repeated under my current environments):

Operation:

make ARCH=arc CROSS_COMPILE=/usr/local/bin/arc-elf32- EXTRA_CFLAGS=-mmedium-calls allmodconfig
make ARCH=arc CROSS_COMPILE=/usr/local/bin/arc-elf32- EXTRA_CFLAGS=-mmedium-calls menuconfig
disable CPU_BIG_ENDIAN
disable CC_OPTIMIZE_FOR_SIZE
make ARCH=arc CROSS_COMPILE=/usr/local/bin/arc-elf32- EXTRA_CFLAGS=-mmedium-calls

Error:

CC [M] fs/hfs/string.o
fs/hfs/string.c: In function 'hfs_strcmp':
fs/hfs/string.c:89:1: internal compiler error: Segmentation fault
}
^
0x7a1faf crash_signal
../../gcc-arc-4.8-dev/gcc/toplev.c:332
0x93fa27 df_get_live_in
../../gcc-arc-4.8-dev/gcc/df.h:1109
0x93fa27 arc_hazard
../../gcc-arc-4.8-dev/gcc/config/arc/arc.c:7995
0x93fa27 arc_hazard
../../gcc-arc-4.8-dev/gcc/config/arc/arc.c:7966
0x944967 get_attr_in_delay_slot(rtx_def_)
../../gcc-arc-4.8-dev/gcc/config/arc/arc.md:441
0x945dff get_attr_in_ret_delay_slot(rtx_def_)
../../gcc-arc-4.8-dev/gcc/config/arc/arc.md:367
0x94787e get_attr_cond_ret_delay_insn(rtx_def_)
../../gcc-arc-4.8-dev/gcc/config/arc/arc.md:722
0x95e7d7 eligible_for_annul_false(rtx_def_, int, rtx_def_, int)
../../gcc-arc-4.8-dev/gcc/config/arc/arc.md:1104
0x75679e make_return_insns
../../gcc-arc-4.8-dev/gcc/reorg.c:3611
0x75679e dbr_schedule(rtx_def_)
../../gcc-arc-4.8-dev/gcc/reorg.c:3764
0x756d7f rest_of_handle_delay_slots
../../gcc-arc-4.8-dev/gcc/reorg.c:3891
Please submit a full bug report,

gcc Information:

[root@gchenlinux linux-next]# arc-elf32-gcc -v
Using built-in specs.
COLLECT_GCC=arc-elf32-gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/arc-elf32/4.8.0/lto-wrapper
Target: arc-elf32
Configured with: ../gcc-arc-4.8-dev/configure --without-header --disable-nls --enable-language=c --disable-threads --disable-shared --enable-werror=no target_configargs=enable_vtable_verify=yes --target=arc-elf32 --with-cpu=arc700 --disable-multilib --with-headers=../newlib/newlib/libc/include
Thread model: single
gcc version 4.8.0 (GCC)

Thanks.

Chen Gang

@Chen-Gang
Copy link
Author

On 11/01/2013 12:49 AM, amylaar wrote:

This might be a bug in GCC in the branch shortening, or it might be an
assembler bug, choosing an instruction
with a LIMM when it shouldn't.

Could you please provide the pre-processed sources with the exact
compilation flags to reproduce the problem?

The related .i and .s files are in attachment.

The command line and issues are below (use the download gcc-arc-4.8-dev.zip and binutils-arc-2.23-dev.zip):

[root@gchenlinux linux-next]# /usr/local/bin/arc-elf32-gcc -Wp,-MD,sound/soc/codecs/.wm8962.o.d -nostdinc -isystem /usr/local/lib/gcc/arc-elf32/4.8.0/include -I/android/public-kernel/linux-next/arch/arc/include -Iarch/arc/include/generated -Iinclude -I/android/public-kernel/linux-next/arch/arc/include/uapi -Iarch/arc/include/generated/uapi -I/android/public-kernel/linux-next/include/uapi -Iinclude/generated/uapi -include /android/public-kernel/linux-next/include/linux/kconfig.h -include /android/public-kernel/linux-next/arch/arc/include/asm/current.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -mA7 -fno-common -pipe -fno-builtin -D__linux__ -fsection-anchors -mlock -mswape -mrtsc -fasynchronous-unwind-tables -gdwarf-2 -O3 -mno-sdata -fcall-used-gp -multcost=16 -fno-reorder-blocks -fno-ipa-cp-clone -fno-partial-inlining -Wframe-l
arger-tha
n=1024 -fno-stack-protector -Wno-unused-but-set-variable -fomit-frame-pointer -g -femit-struct-debug-baseonly -fno-var-tracking -fno-inline-functions-called-once -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -DCC_HAVE_ASM_GOTO -mmedium-calls -DMODULE -mlong-calls -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(wm8962)" -D"KBUILD_MODNAME=KBUILD_STR(snd_soc_wm8962)" -c -o sound/soc/codecs/.tmp_wm8962.o sound/soc/codecs/wm8962.c -save-temps
arc-elf32-gcc: warning: -pipe ignored because -save-temps specified
wm8962.s: Assembler messages:
wm8962.s:244: Error: operand out of range (260 is not between -256 and 255)

If necessary to let me additional try, please let me know

Thanks.

Chen Gang

1 "sound/soc/codecs/wm8962.c"

1 "/android/public-kernel/linux-next//"

1 ""

1 "/android/public-kernel/linux-next/include/linux/kconfig.h" 1

1 "include/generated/autoconf.h" 1

5 "/android/public-kernel/linux-next/include/linux/kconfig.h" 2

1 "" 2

1 "/android/public-kernel/linux-next/arch/arc/include/asm/current.h" 1

21 "/android/public-kernel/linux-next/arch/arc/include/asm/current.h"

register struct task_struct *curr_arc asm("r25");

1 "" 2

1 "sound/soc/codecs/wm8962.c"

14 "sound/soc/codecs/wm8962.c"

1 "include/linux/module.h" 1

9 "include/linux/module.h"

1 "include/linux/list.h" 1

1 "include/linux/types.h" 1

1 "include/uapi/linux/types.h" 1

1 "arch/arc/include/generated/asm/types.h" 1

1 "/android/public-kernel/linux-next/include/uapi/asm-generic/types.h" 1

1 "include/asm-generic/int-ll64.h" 1

10 "include/asm-generic/int-ll64.h"

1 "include/uapi/asm-generic/int-ll64.h" 1

11 "include/uapi/asm-generic/int-ll64.h"

1 "arch/arc/include/generated/asm/bitsperlong.h" 1

1 "include/asm-generic/bitsperlong.h" 1

1 "include/uapi/asm-generic/bitsperlong.h" 1

5 "include/asm-generic/bitsperlong.h" 2

1 "arch/arc/include/generated/asm/bitsperlong.h" 2

12 "include/uapi/asm-generic/int-ll64.h" 2

typedef signed char __s8;
typedef unsigned char __u8;

typedef signed short __s16;
typedef unsigned short __u16;

typedef signed int __s32;
typedef unsigned int __u32;

extension typedef signed long long s64;
__extension
typedef unsigned long long __u64;

11 "include/asm-generic/int-ll64.h" 2

typedef signed char s8;
typedef unsigned char u8;

typedef signed short s16;
typedef unsigned short u16;

typedef signed int s32;
typedef unsigned int u32;

typedef signed long long s64;
typedef unsigned long long u64;

8 "/android/public-kernel/linux-next/include/uapi/asm-generic/types.h" 2

1 "arch/arc/include/generated/asm/types.h" 2

5 "include/uapi/linux/types.h" 2

13 "include/uapi/linux/types.h"

1 "/android/public-kernel/linux-next/include/uapi/linux/posix_types.h" 1

1 "include/linux/stddef.h" 1

1 "include/uapi/linux/stddef.h" 1

1 "include/linux/compiler.h" 1

54 "include/linux/compiler.h"

1 "include/linux/compiler-gcc.h" 1

103 "include/linux/compiler-gcc.h"

1 "include/linux/compiler-gcc4.h" 1

104 "include/linux/compiler-gcc.h" 2

55 "include/linux/compiler.h" 2

72 "include/linux/compiler.h"

struct ftrace_branch_data {
const char *func;
const char *file;
unsigned line;
union {
struct {
unsigned long correct;
unsigned long incorrect;
};
struct {
unsigned long miss;
unsigned long hit;
};
unsigned long miss_hit[2];
};
};

1 "include/uapi/linux/stddef.h" 2

5 "include/linux/stddef.h" 2

enum {
false = 0,
true = 1
};

5 "/android/public-kernel/linux-next/include/uapi/linux/posix_types.h" 2

24 "/android/public-kernel/linux-next/include/uapi/linux/posix_types.h"

typedef struct {
unsigned long fds_bits[1024 / (8 * sizeof(long))];
} __kernel_fd_set;

typedef void (*__kernel_sighandler_t)(int);

typedef int __kernel_key_t;
typedef int __kernel_mqd_t;

1 "arch/arc/include/generated/asm/posix_types.h" 1

1 "/android/public-kernel/linux-next/include/uapi/asm-generic/posix_types.h" 1

1 "arch/arc/include/generated/asm/bitsperlong.h" 1

5 "/android/public-kernel/linux-next/include/uapi/asm-generic/posix_types.h" 2

14 "/android/public-kernel/linux-next/include/uapi/asm-generic/posix_types.h"

typedef long __kernel_long_t;
typedef unsigned long __kernel_ulong_t;

typedef __kernel_ulong_t __kernel_ino_t;

typedef unsigned int __kernel_mode_t;

typedef int __kernel_pid_t;

typedef int __kernel_ipc_pid_t;

typedef unsigned int __kernel_uid_t;
typedef unsigned int __kernel_gid_t;

typedef __kernel_long_t __kernel_suseconds_t;

typedef int __kernel_daddr_t;

typedef unsigned int __kernel_uid32_t;
typedef unsigned int __kernel_gid32_t;

typedef __kernel_uid_t __kernel_old_uid_t;
typedef __kernel_gid_t __kernel_old_gid_t;

typedef unsigned int __kernel_old_dev_t;

67 "/android/public-kernel/linux-next/include/uapi/asm-generic/posix_types.h"

typedef unsigned int __kernel_size_t;
typedef int __kernel_ssize_t;
typedef int __kernel_ptrdiff_t;

78 "/android/public-kernel/linux-next/include/uapi/asm-generic/posix_types.h"

typedef struct {
int val[2];
} __kernel_fsid_t;

typedef __kernel_long_t __kernel_off_t;
typedef long long __kernel_loff_t;
typedef __kernel_long_t __kernel_time_t;
typedef __kernel_long_t __kernel_clock_t;
typedef int __kernel_timer_t;
typedef int __kernel_clockid_t;
typedef char * __kernel_caddr_t;
typedef unsigned short __kernel_uid16_t;
typedef unsigned short __kernel_gid16_t;

1 "arch/arc/include/generated/asm/posix_types.h" 2

36 "/android/public-kernel/linux-next/include/uapi/linux/posix_types.h" 2

14 "include/uapi/linux/types.h" 2

32 "include/uapi/linux/types.h"

typedef __u16 __le16;
typedef __u16 __be16;
typedef __u32 __le32;
typedef __u32 __be32;
typedef __u64 __le64;
typedef __u64 __be64;

typedef __u16 __sum16;
typedef __u32 __wsum;

6 "include/linux/types.h" 2

typedef __u32 __kernel_dev_t;

typedef __kernel_fd_set fd_set;
typedef __kernel_dev_t dev_t;
typedef __kernel_ino_t ino_t;
typedef __kernel_mode_t mode_t;
typedef unsigned short umode_t;
typedef __u32 nlink_t;
typedef __kernel_off_t off_t;
typedef __kernel_pid_t pid_t;
typedef __kernel_daddr_t daddr_t;
typedef __kernel_key_t key_t;
typedef __kernel_suseconds_t suseconds_t;
typedef __kernel_timer_t timer_t;
typedef __kernel_clockid_t clockid_t;
typedef __kernel_mqd_t mqd_t;

typedef _Bool bool;

typedef __kernel_uid32_t uid_t;
typedef __kernel_gid32_t gid_t;
typedef __kernel_uid16_t uid16_t;
typedef __kernel_gid16_t gid16_t;

typedef unsigned long uintptr_t;

45 "include/linux/types.h"

typedef __kernel_loff_t loff_t;

54 "include/linux/types.h"

typedef __kernel_size_t size_t;

typedef __kernel_ssize_t ssize_t;

typedef __kernel_ptrdiff_t ptrdiff_t;

typedef __kernel_time_t time_t;

typedef __kernel_clock_t clock_t;

typedef __kernel_caddr_t caddr_t;

typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;

typedef unsigned char unchar;
typedef unsigned short ushort;
typedef unsigned int uint;
typedef unsigned long ulong;

typedef __u8 u_int8_t;
typedef __s8 int8_t;
typedef __u16 u_int16_t;
typedef __s16 int16_t;
typedef __u32 u_int32_t;
typedef __s32 int32_t;

typedef __u8 uint8_t;
typedef __u16 uint16_t;
typedef __u32 uint32_t;

typedef __u64 uint64_t;
typedef __u64 u_int64_t;
typedef __s64 int64_t;

130 "include/linux/types.h"

typedef u64 sector_t;
typedef u64 blkcnt_t;

148 "include/linux/types.h"

typedef u32 dma_addr_t;

157 "include/linux/types.h"

typedef unsigned gfp_t;
typedef unsigned fmode_t;
typedef unsigned oom_flags_t;

typedef u32 phys_addr_t;

typedef phys_addr_t resource_size_t;

typedef unsigned long irq_hw_number_t;

typedef struct {
int counter;
} atomic_t;

struct list_head {
struct list_head *next, *prev;
};

struct hlist_head {
struct hlist_node *first;
};

struct hlist_node {
struct hlist_node _next, *_pprev;
};

struct ustat {
__kernel_daddr_t f_tfree;
__kernel_ino_t f_tinode;
char f_fname[6];
char f_fpack[6];
};

struct callback_head {
struct callback_head _next;
void (_func)(struct callback_head *head);
};

5 "include/linux/list.h" 2

1 "include/linux/poison.h" 1

7 "include/linux/list.h" 2

1 "/android/public-kernel/linux-next/include/uapi/linux/const.h" 1

8 "include/linux/list.h" 2

24 "include/linux/list.h"

static inline attribute((always_inline)) attribute((no_instrument_function)) void INIT_LIST_HEAD(struct list_head *list)
{
list->next = list;
list->prev = list;
}

47 "include/linux/list.h"

extern void __list_add(struct list_head *new,
struct list_head *prev,
struct list_head *next);

60 "include/linux/list.h"

static inline attribute((always_inline)) attribute((no_instrument_function)) void list_add(struct list_head *new, struct list_head *head)
{
__list_add(new, head, head->next);
}

74 "include/linux/list.h"

static inline attribute((always_inline)) attribute((no_instrument_function)) void list_add_tail(struct list_head *new, struct list_head *head)
{
__list_add(new, head->prev, head);
}

86 "include/linux/list.h"

static inline attribute((always_inline)) attribute((no_instrument_function)) void __list_del(struct list_head * prev, struct list_head * next)
{
next->prev = prev;
prev->next = next;
}

111 "include/linux/list.h"

extern void __list_del_entry(struct list_head *entry);
extern void list_del(struct list_head *entry);

122 "include/linux/list.h"

static inline attribute((always_inline)) attribute((no_instrument_function)) void list_replace(struct list_head *old,
struct list_head *new)
{
new->next = old->next;
new->next->prev = new;
new->prev = old->prev;
new->prev->next = new;
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void list_replace_init(struct list_head *old,
struct list_head *new)
{
list_replace(old, new);
INIT_LIST_HEAD(old);
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void list_del_init(struct list_head *entry)
{
__list_del_entry(entry);
INIT_LIST_HEAD(entry);
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void list_move(struct list_head *list, struct list_head *head)
{
__list_del_entry(list);
list_add(list, head);
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void list_move_tail(struct list_head *list,
struct list_head *head)
{
__list_del_entry(list);
list_add_tail(list, head);
}

static inline attribute((always_inline)) attribute((no_instrument_function)) int list_is_last(const struct list_head *list,
const struct list_head *head)
{
return list->next == head;
}

static inline attribute((always_inline)) attribute((no_instrument_function)) int list_empty(const struct list_head *head)
{
return head->next == head;
}

204 "include/linux/list.h"

static inline attribute((always_inline)) attribute((no_instrument_function)) int list_empty_careful(const struct list_head *head)
{
struct list_head *next = head->next;
return (next == head) && (next == head->prev);
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void list_rotate_left(struct list_head *head)
{
struct list_head *first;

if (!list_empty(head)) {
first = head->next;
list_move_tail(first, head);
}
}

static inline attribute((always_inline)) attribute((no_instrument_function)) int list_is_singular(const struct list_head *head)
{
return !list_empty(head) && (head->next == head->prev);
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void __list_cut_position(struct list_head *list,
struct list_head *head, struct list_head *entry)
{
struct list_head *new_first = entry->next;
list->next = head->next;
list->next->prev = list;
list->prev = entry;
entry->next = list;
head->next = new_first;
new_first->prev = head;
}

259 "include/linux/list.h"

static inline attribute((always_inline)) attribute((no_instrument_function)) void list_cut_position(struct list_head *list,
struct list_head *head, struct list_head *entry)
{
if (list_empty(head))
return;
if (list_is_singular(head) &&
(head->next != entry && head != entry))
return;
if (entry == head)
INIT_LIST_HEAD(list);
else
__list_cut_position(list, head, entry);
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void __list_splice(const struct list_head *list,
struct list_head *prev,
struct list_head *next)
{
struct list_head *first = list->next;
struct list_head *last = list->prev;

first->prev = prev;
prev->next = first;

last->next = next;
next->prev = last;
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void list_splice(const struct list_head *list,
struct list_head *head)
{
if (!list_empty(list))
__list_splice(list, head, head->next);
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void list_splice_tail(struct list_head *list,
struct list_head *head)
{
if (!list_empty(list))
__list_splice(list, head->prev, head);
}

318 "include/linux/list.h"

static inline attribute((always_inline)) attribute((no_instrument_function)) void list_splice_init(struct list_head *list,
struct list_head *head)
{
if (!list_empty(list)) {
__list_splice(list, head, head->next);
INIT_LIST_HEAD(list);
}
}

335 "include/linux/list.h"

static inline attribute((always_inline)) attribute((no_instrument_function)) void list_splice_tail_init(struct list_head *list,
struct list_head *head)
{
if (!list_empty(list)) {
__list_splice(list, head->prev, head);
INIT_LIST_HEAD(list);
}
}

570 "include/linux/list.h"

static inline attribute((always_inline)) attribute((no_instrument_function)) void INIT_HLIST_NODE(struct hlist_node *h)
{
h->next = ((void *)0);
h->pprev = ((void *)0);
}

static inline attribute((always_inline)) attribute((no_instrument_function)) int hlist_unhashed(const struct hlist_node *h)
{
return !h->pprev;
}

static inline attribute((always_inline)) attribute((no_instrument_function)) int hlist_empty(const struct hlist_head *h)
{
return !h->first;
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void __hlist_del(struct hlist_node _n)
{
struct hlist_node *next = n->next;
struct hlist_node *_pprev = n->pprev;
*pprev = next;
if (next)
next->pprev = pprev;
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void hlist_del(struct hlist_node *n)
{
__hlist_del(n);
n->next = ((void *) 0x00100100 + 0);
n->pprev = ((void *) 0x00200200 + 0);
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void hlist_del_init(struct hlist_node *n)
{
if (!hlist_unhashed(n)) {
__hlist_del(n);
INIT_HLIST_NODE(n);
}
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void hlist_add_head(struct hlist_node *n, struct hlist_head *h)
{
struct hlist_node *first = h->first;
n->next = first;
if (first)
first->pprev = &n->next;
h->first = n;
n->pprev = &h->first;
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void hlist_add_before(struct hlist_node *n,
struct hlist_node *next)
{
n->pprev = next->pprev;
n->next = next;
next->pprev = &n->next;
*(n->pprev) = n;
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void hlist_add_after(struct hlist_node *n,
struct hlist_node *next)
{
next->next = n->next;
n->next = next;
next->pprev = &n->next;

if(next->next)
next->next->pprev = &next->next;
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void hlist_add_fake(struct hlist_node *n)
{
n->pprev = &n->next;
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void hlist_move_list(struct hlist_head *old,
struct hlist_head *new)
{
new->first = old->first;
if (new->first)
new->first->pprev = &new->first;
old->first = ((void *)0);
}

10 "include/linux/module.h" 2

1 "include/linux/stat.h" 1

1 "arch/arc/include/generated/asm/stat.h" 1

1 "/android/public-kernel/linux-next/include/uapi/asm-generic/stat.h" 1

19 "/android/public-kernel/linux-next/include/uapi/asm-generic/stat.h"

1 "arch/arc/include/generated/asm/bitsperlong.h" 1

20 "/android/public-kernel/linux-next/include/uapi/asm-generic/stat.h" 2

struct stat {
unsigned long st_dev;
unsigned long st_ino;
unsigned int st_mode;
unsigned int st_nlink;
unsigned int st_uid;
unsigned int st_gid;
unsigned long st_rdev;
unsigned long __pad1;
long st_size;
int st_blksize;
int __pad2;
long st_blocks;
long st_atime;
unsigned long st_atime_nsec;
long st_mtime;
unsigned long st_mtime_nsec;
long st_ctime;
unsigned long st_ctime_nsec;
unsigned int __unused4;
unsigned int __unused5;
};

struct stat64 {
unsigned long long st_dev;
unsigned long long st_ino;
unsigned int st_mode;
unsigned int st_nlink;
unsigned int st_uid;
unsigned int st_gid;
unsigned long long st_rdev;
unsigned long long __pad1;
long long st_size;
int st_blksize;
int __pad2;
long long st_blocks;
int st_atime;
unsigned int st_atime_nsec;
int st_mtime;
unsigned int st_mtime_nsec;
int st_ctime;
unsigned int st_ctime_nsec;
unsigned int __unused4;
unsigned int __unused5;
};

1 "arch/arc/include/generated/asm/stat.h" 2

6 "include/linux/stat.h" 2

1 "include/uapi/linux/stat.h" 1

7 "include/linux/stat.h" 2

18 "include/linux/stat.h"

1 "include/linux/time.h" 1

1 "include/linux/cache.h" 1

1 "include/linux/kernel.h" 1

1 "/usr/local/lib/gcc/arc-elf32/4.8.0/include/stdarg.h" 1 3 4

40 "/usr/local/lib/gcc/arc-elf32/4.8.0/include/stdarg.h" 3 4

typedef __builtin_va_list __gnuc_va_list;

98 "/usr/local/lib/gcc/arc-elf32/4.8.0/include/stdarg.h" 3 4

typedef __gnuc_va_list va_list;

6 "include/linux/kernel.h" 2

1 "include/linux/linkage.h" 1

1 "include/linux/stringify.h" 1

6 "include/linux/linkage.h" 2

1 "include/linux/export.h" 1

26 "include/linux/export.h"

struct kernel_symbol
{
unsigned long value;
const char *name;
};

extern struct module __this_module;

7 "include/linux/linkage.h" 2

1 "/android/public-kernel/linux-next/arch/arc/include/asm/linkage.h" 1

8 "include/linux/linkage.h" 2

7 "include/linux/kernel.h" 2

1 "include/linux/bitops.h" 1

1 "arch/arc/include/generated/asm/types.h" 1

4 "include/linux/bitops.h" 2

13 "include/linux/bitops.h"

extern unsigned int __sw_hweight8(unsigned int w);
extern unsigned int __sw_hweight16(unsigned int w);
extern unsigned int __sw_hweight32(unsigned int w);
extern unsigned long __sw_hweight64(__u64 w);

1 "/android/public-kernel/linux-next/arch/arc/include/asm/bitops.h" 1

30 "/android/public-kernel/linux-next/arch/arc/include/asm/bitops.h"

static inline attribute((always_inline)) attribute((no_instrument_function)) void set_bit(unsigned long nr, volatile unsigned long *m)
{
unsigned int temp;

m += nr >> 5;

if (__builtin_constant_p(nr))
nr &= 0x1f;

asm volatile(
"1: llock %0, [%1] \n"
" bset %0, %0, %2 \n"
" scond %0, [%1] \n"
" bnz 1b \n"
: "=&r"(temp)
: "r"(m), "ir"(nr)
: "cc");
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void clear_bit(unsigned long nr, volatile unsigned long *m)
{
unsigned int temp;

m += nr >> 5;

if (__builtin_constant_p(nr))
nr &= 0x1f;

asm volatile(
"1: llock %0, [%1] \n"
" bclr %0, %0, %2 \n"
" scond %0, [%1] \n"
" bnz 1b \n"
: "=&r"(temp)
: "r"(m), "ir"(nr)
: "cc");
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void change_bit(unsigned long nr, volatile unsigned long *m)
{
unsigned int temp;

m += nr >> 5;

if (__builtin_constant_p(nr))
nr &= 0x1f;

asm volatile(
"1: llock %0, [%1] \n"
" bxor %0, %0, %2 \n"
" scond %0, [%1] \n"
" bnz 1b \n"
: "=&r"(temp)
: "r"(m), "ir"(nr)
: "cc");
}

98 "/android/public-kernel/linux-next/arch/arc/include/asm/bitops.h"

static inline attribute((always_inline)) attribute((no_instrument_function)) int test_and_set_bit(unsigned long nr, volatile unsigned long *m)
{
unsigned long old, temp;

m += nr >> 5;

if (__builtin_constant_p(nr))
nr &= 0x1f;

asm volatile(
"1: llock %0, [%2] \n"
" bset %1, %0, %3 \n"
" scond %1, [%2] \n"
" bnz 1b \n"
: "=&r"(old), "=&r"(temp)
: "r"(m), "ir"(nr)
: "cc");

return (old & (1 << nr)) != 0;
}

static inline attribute((always_inline)) attribute((no_instrument_function)) int
test_and_clear_bit(unsigned long nr, volatile unsigned long *m)
{
unsigned int old, temp;

m += nr >> 5;

if (__builtin_constant_p(nr))
nr &= 0x1f;

asm volatile(
"1: llock %0, [%2] \n"
" bclr %1, %0, %3 \n"
" scond %1, [%2] \n"
" bnz 1b \n"
: "=&r"(old), "=&r"(temp)
: "r"(m), "ir"(nr)
: "cc");

return (old & (1 << nr)) != 0;
}

static inline attribute((always_inline)) attribute((no_instrument_function)) int
test_and_change_bit(unsigned long nr, volatile unsigned long *m)
{
unsigned int old, temp;

m += nr >> 5;

if (__builtin_constant_p(nr))
nr &= 0x1f;

asm volatile(
"1: llock %0, [%2] \n"
" bxor %1, %0, %3 \n"
" scond %1, [%2] \n"
" bnz 1b \n"
: "=&r"(old), "=&r"(temp)
: "r"(m), "ir"(nr)
: "cc");

return (old & (1 << nr)) != 0;
}

293 "/android/public-kernel/linux-next/arch/arc/include/asm/bitops.h"

static inline attribute((always_inline)) attribute((no_instrument_function)) void __set_bit(unsigned long nr, volatile unsigned long *m)
{
unsigned long temp;
m += nr >> 5;

if (__builtin_constant_p(nr))
nr &= 0x1f;

temp = *m;
*m = temp | (1UL << nr);
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void __clear_bit(unsigned long nr, volatile unsigned long *m)
{
unsigned long temp;
m += nr >> 5;

if (__builtin_constant_p(nr))
nr &= 0x1f;

temp = *m;
*m = temp & ~(1UL << nr);
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void __change_bit(unsigned long nr, volatile unsigned long *m)
{
unsigned long temp;
m += nr >> 5;

if (__builtin_constant_p(nr))
nr &= 0x1f;

temp = *m;
*m = temp ^ (1UL << nr);
}

static inline attribute((always_inline)) attribute((no_instrument_function)) int
__test_and_set_bit(unsigned long nr, volatile unsigned long *m)
{
unsigned long old;
m += nr >> 5;

if (__builtin_constant_p(nr))
nr &= 0x1f;

old = *m;
*m = old | (1 << nr);

return (old & (1 << nr)) != 0;
}

static inline attribute((always_inline)) attribute((no_instrument_function)) int
__test_and_clear_bit(unsigned long nr, volatile unsigned long *m)
{
unsigned long old;
m += nr >> 5;

if (__builtin_constant_p(nr))
nr &= 0x1f;

old = *m;
*m = old & ~(1 << nr);

return (old & (1 << nr)) != 0;
}

static inline attribute((always_inline)) attribute((no_instrument_function)) int
__test_and_change_bit(unsigned long nr, volatile unsigned long *m)
{
unsigned long old;
m += nr >> 5;

if (__builtin_constant_p(nr))
nr &= 0x1f;

old = *m;
*m = old ^ (1 << nr);

return (old & (1 << nr)) != 0;
}

static inline attribute((always_inline)) attribute((no_instrument_function)) int
__constant_test_bit(unsigned int nr, const volatile unsigned long *addr)
{
return ((1UL << (nr & 31)) &
(((const volatile unsigned int *)addr)[nr >> 5])) != 0;
}

static inline attribute((always_inline)) attribute((no_instrument_function)) int
__test_bit(unsigned int nr, const volatile unsigned long *addr)
{
unsigned long mask;

addr += nr >> 5;

mask = 1 << nr;

return ((mask & *addr) != 0);
}

408 "/android/public-kernel/linux-next/arch/arc/include/asm/bitops.h"

static inline attribute((always_inline)) attribute((no_instrument_function)) attribute ((const)) int clz(unsigned int x)
{
unsigned int res;

asm volatile(
" norm.f %0, %1 \n"
" mov.n %0, 0 \n"
" add.p %0, %0, 1 \n"
: "=r"(res)
: "r"(x)
: "cc");

return res;
}

static inline attribute((always_inline)) attribute((no_instrument_function)) int constant_fls(int x)
{
int r = 32;

if (!x)
return 0;
if (!(x & 0xffff0000u)) {
x <<= 16;
r -= 16;
}
if (!(x & 0xff000000u)) {
x <<= 8;
r -= 8;
}
if (!(x & 0xf0000000u)) {
x <<= 4;
r -= 4;
}
if (!(x & 0xc0000000u)) {
x <<= 2;
r -= 2;
}
if (!(x & 0x80000000u)) {
x <<= 1;
r -= 1;
}
return r;
}

static inline attribute((always_inline)) attribute((no_instrument_function)) attribute ((const)) int fls(unsigned long x)
{
if (__builtin_constant_p(x))
return constant_fls(x);

return 32 - clz(x);
}

static inline attribute((always_inline)) attribute((no_instrument_function)) attribute ((const)) int __fls(unsigned long x)
{
if (!x)
return 0;
else
return fls(x) - 1;
}

485 "/android/public-kernel/linux-next/arch/arc/include/asm/bitops.h"

static inline attribute((always_inline)) attribute((no_instrument_function)) attribute ((const)) int __ffs(unsigned long word)
{
if (!word)
return word;

return ({ unsigned long __t = (word); fls(__t & -__t); }) - 1;
}

503 "/android/public-kernel/linux-next/arch/arc/include/asm/bitops.h"

1 "include/asm-generic/bitops/hweight.h" 1

1 "include/asm-generic/bitops/arch_hweight.h" 1

1 "arch/arc/include/generated/asm/types.h" 1

5 "include/asm-generic/bitops/arch_hweight.h" 2

static inline attribute((always_inline)) attribute((no_instrument_function)) unsigned int __arch_hweight32(unsigned int w)
{
return __sw_hweight32(w);
}

static inline attribute((always_inline)) attribute((no_instrument_function)) unsigned int __arch_hweight16(unsigned int w)
{
return __sw_hweight16(w);
}

static inline attribute((always_inline)) attribute((no_instrument_function)) unsigned int __arch_hweight8(unsigned int w)
{
return __sw_hweight8(w);
}

static inline attribute((always_inline)) attribute((no_instrument_function)) unsigned long __arch_hweight64(__u64 w)
{
return __sw_hweight64(w);
}

5 "include/asm-generic/bitops/hweight.h" 2

1 "include/asm-generic/bitops/const_hweight.h" 1

6 "include/asm-generic/bitops/hweight.h" 2

504 "/android/public-kernel/linux-next/arch/arc/include/asm/bitops.h" 2

1 "include/asm-generic/bitops/fls64.h" 1

1 "arch/arc/include/generated/asm/types.h" 1

5 "include/asm-generic/bitops/fls64.h" 2

18 "include/asm-generic/bitops/fls64.h"

static inline attribute((always_inline)) attribute((no_instrument_function)) attribute((always_inline)) int fls64(__u64 x)
{
__u32 h = x >> 32;
if (h)
return fls(h) + 32;
return fls(x);
}

505 "/android/public-kernel/linux-next/arch/arc/include/asm/bitops.h" 2

1 "include/asm-generic/bitops/sched.h" 1

1 "arch/arc/include/generated/asm/types.h" 1

6 "include/asm-generic/bitops/sched.h" 2

static inline attribute((always_inline)) attribute((no_instrument_function)) int sched_find_first_bit(const unsigned long *b)
{

if (b[0])
return __ffs(b[0]);
if (b[1])
return __ffs(b[1]) + 32;
if (b[2])
return __ffs(b[2]) + 64;
return __ffs(b[3]) + 96;

}

506 "/android/public-kernel/linux-next/arch/arc/include/asm/bitops.h" 2

1 "include/asm-generic/bitops/lock.h" 1

507 "/android/public-kernel/linux-next/arch/arc/include/asm/bitops.h" 2

1 "include/asm-generic/bitops/find.h" 1

11 "include/asm-generic/bitops/find.h"

extern unsigned long find_next_bit(const unsigned long *addr, unsigned long
size, unsigned long offset);

22 "include/asm-generic/bitops/find.h"

extern unsigned long find_next_zero_bit(const unsigned long *addr, unsigned
long size, unsigned long offset);

35 "include/asm-generic/bitops/find.h"

extern unsigned long find_first_bit(const unsigned long *addr,
unsigned long size);

45 "include/asm-generic/bitops/find.h"

extern unsigned long find_first_zero_bit(const unsigned long *addr,
unsigned long size);

509 "/android/public-kernel/linux-next/arch/arc/include/asm/bitops.h" 2

1 "include/asm-generic/bitops/le.h" 1

1 "arch/arc/include/generated/asm/types.h" 1

5 "include/asm-generic/bitops/le.h" 2

1 "/android/public-kernel/linux-next/arch/arc/include/uapi/asm/byteorder.h" 1

15 "/android/public-kernel/linux-next/arch/arc/include/uapi/asm/byteorder.h"

1 "include/linux/byteorder/little_endian.h" 1

1 "include/uapi/linux/byteorder/little_endian.h" 1

12 "include/uapi/linux/byteorder/little_endian.h"

1 "include/linux/swab.h" 1

1 "include/uapi/linux/swab.h" 1

1 "/android/public-kernel/linux-next/arch/arc/include/uapi/asm/swab.h" 1

7 "include/uapi/linux/swab.h" 2

46 "include/uapi/linux/swab.h"

static inline attribute((always_inline)) attribute((no_instrument_function)) attribute((const)) __u16 __fswab16(__u16 val)
{

return ((__u16)( (((__u16)(val) & (__u16)0x00ffU) << 8) | (((__u16)(val) & (__u16)0xff00U) >> 8)));

}

static inline attribute((always_inline)) attribute((no_instrument_function)) attribute((const)) __u32 __fswab32(__u32 val)
{

return ({ unsigned int tmp = val; asm( " swape %0, %1 \n" : "=r" (tmp) : "r" (tmp)); tmp; });

}

static inline attribute((always_inline)) attribute((no_instrument_function)) attribute((const)) __u64 __fswab64(__u64 val)
{

__u32 h = val >> 32;
__u32 l = val & ((1ULL << 32) - 1);
return (((__u64)__fswab32(l)) << 32) | ((__u64)(__fswab32(h)));

}

static inline attribute((always_inline)) attribute((no_instrument_function)) attribute((const)) __u32 __fswahw32(__u32 val)
{

return ((__u32)( (((__u32)(val) & (__u32)0x0000ffffUL) << 16) | (((__u32)(val) & (__u32)0xffff0000UL) >> 16)));

}

static inline attribute((always_inline)) attribute((no_instrument_function)) attribute((const)) __u32 __fswahb32(__u32 val)
{

return ((__u32)( (((__u32)(val) & (__u32)0x00ff00ffUL) << 8) | (((__u32)(val) & (__u32)0xff00ff00UL) >> 8)));

}

154 "include/uapi/linux/swab.h"

static inline attribute((always_inline)) attribute((no_instrument_function)) __u16 __swab16p(const __u16 *p)
{

return (__builtin_constant_p((__u16)(_p)) ? ((__u16)( (((__u16)(_p) & (__u16)0x00ffU) << 8) | (((__u16)(_p) & (__u16)0xff00U) >> 8))) : __fswab16(_p));

}

static inline attribute((always_inline)) attribute((no_instrument_function)) __u32 __swab32p(const __u32 *p)
{

return (__builtin_constant_p((__u32)(_p)) ? ((__u32)( (((__u32)(_p) & (__u32)0x000000ffUL) << 24) | (((__u32)(_p) & (__u32)0x0000ff00UL) << 8) | (((__u32)(_p) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(_p) & (__u32)0xff000000UL) >> 24))) : __fswab32(_p));

}

static inline attribute((always_inline)) attribute((no_instrument_function)) __u64 __swab64p(const __u64 *p)
{

return (__builtin_constant_p((__u64)(_p)) ? ((__u64)( (((__u64)(_p) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(_p) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(_p) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(_p) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(_p) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(_p) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(_p) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(_p) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(_p));

}

static inline attribute((always_inline)) attribute((no_instrument_function)) __u32 __swahw32p(const __u32 *p)
{

return (__builtin_constant_p((__u32)(_p)) ? ((__u32)( (((__u32)(_p) & (__u32)0x0000ffffUL) << 16) | (((__u32)(_p) & (__u32)0xffff0000UL) >> 16))) : __fswahw32(_p));

}

static inline attribute((always_inline)) attribute((no_instrument_function)) __u32 __swahb32p(const __u32 *p)
{

return (__builtin_constant_p((__u32)(_p)) ? ((__u32)( (((__u32)(_p) & (__u32)0x00ff00ffUL) << 8) | (((__u32)(_p) & (__u32)0xff00ff00UL) >> 8))) : __fswahb32(_p));

}

static inline attribute((always_inline)) attribute((no_instrument_function)) void __swab16s(__u16 *p)
{

*p = __swab16p(p);

}

static inline attribute((always_inline)) attribute((no_instrument_function)) void __swab32s(__u32 *p)
{

*p = __swab32p(p);

}

static inline attribute((always_inline)) attribute((no_instrument_function)) void __swab64s(__u64 *p)
{

*p = __swab64p(p);

}

static inline attribute((always_inline)) attribute((no_instrument_function)) void __swahw32s(__u32 *p)
{

*p = __swahw32p(p);

}

static inline attribute((always_inline)) attribute((no_instrument_function)) void __swahb32s(__u32 *p)
{

*p = __swahb32p(p);

}

5 "include/linux/swab.h" 2

13 "include/uapi/linux/byteorder/little_endian.h" 2

43 "include/uapi/linux/byteorder/little_endian.h"

static inline attribute((always_inline)) attribute((no_instrument_function)) le64 __cpu_to_le64p(const __u64 _p)
{
return ( __le64)_p;
}
static inline __attribute
((always_inline)) attribute((no_instrument_function)) u64 __le64_to_cpup(const __le64 _p)
{
return ( __u64)_p;
}
static inline __attribute
((always_inline)) attribute((no_instrument_function)) le32 __cpu_to_le32p(const __u32 _p)
{
return ( __le32)_p;
}
static inline __attribute
((always_inline)) attribute((no_instrument_function)) u32 __le32_to_cpup(const __le32 _p)
{
return ( __u32)_p;
}
static inline __attribute
((always_inline)) attribute((no_instrument_function)) le16 __cpu_to_le16p(const __u16 _p)
{
return ( __le16)_p;
}
static inline __attribute
((always_inline)) attribute((no_instrument_function)) u16 __le16_to_cpup(const __le16 _p)
{
return ( __u16)_p;
}
static inline __attribute
((always_inline)) attribute((no_instrument_function)) *be64 __cpu_to_be64p(const __u64 p)
{
return ( __be64)__swab64p(p);
}
static inline __attribute
((always_inline)) attribute((no_instrument_function)) **u64 __be64_to_cpup(const __be64 p)
{
return __swab64p((__u64 )p);
}
static inline __attribute
((always_inline)) attribute((no_instrument_function)) *be32 __cpu_to_be32p(const __u32 p)
{
return ( __be32)__swab32p(p);
}
static inline __attribute
((always_inline)) attribute((no_instrument_function)) **u32 __be32_to_cpup(const __be32 p)
{
return __swab32p((__u32 )p);
}
static inline __attribute
((always_inline)) attribute((no_instrument_function)) *be16 __cpu_to_be16p(const __u16 p)
{
return ( __be16)__swab16p(p);
}
static inline __attribute
((always_inline)) attribute((no_instrument_function)) __u16 __be16_to_cpup(const __be16 *p)
{
return __swab16p((__u16 *)p);
}

5 "include/linux/byteorder/little_endian.h" 2

1 "include/linux/byteorder/generic.h" 1

143 "include/linux/byteorder/generic.h"

static inline attribute((always_inline)) attribute((no_instrument_function)) void le16_add_cpu(__le16 _var, u16 val)
{
*var = (( __le16)(__u16)((( __u16)(__le16)(_var)) + val));
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void le32_add_cpu(__le32 _var, u32 val)
{
*var = (( __le32)(__u32)((( __u32)(__le32)(_var)) + val));
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void le64_add_cpu(__le64 _var, u64 val)
{
*var = (( __le64)(__u64)((( __u64)(__le64)(_var)) + val));
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void be16_add_cpu(__be16 _var, u16 val)
{
*var = (( __be16)(__builtin_constant_p((__u16)(((__builtin_constant_p((__u16)(( __u16)(__be16)(_var))) ? ((__u16)( (((__u16)(( __u16)(__be16)(_var)) & (__u16)0x00ffU) << 8) | (((__u16)(( __u16)(__be16)(_var)) & (__u16)0xff00U) >> 8))) : __fswab16(( __u16)(__be16)(_var))) + val))) ? ((__u16)( (((__u16)(((__builtin_constant_p((__u16)(( __u16)(__be16)(_var))) ? ((__u16)( (((__u16)(( __u16)(__be16)(_var)) & (__u16)0x00ffU) << 8) | (((__u16)(( __u16)(__be16)(_var)) & (__u16)0xff00U) >> 8))) : __fswab16(( __u16)(__be16)(_var))) + val)) & (__u16)0x00ffU) << 8) | (((__u16)(((__builtin_constant_p((__u16)(( __u16)(__be16)(_var))) ? ((__u16)( (((__u16)(( __u16)(__be16)(_var)) & (__u16)0x00ffU) << 8) | (((__u16)(( __u16)(__be16)(_var)) & (__u16)0xff00U) >> 8))) : __fswab16(( __u16)(__be16)(_var))) + val)) & (__u16)0xff00U) >> 8))) : __fswab16(((__builtin_constant_p((__u16)(( __u16)(__be16)(_var))) ? ((__u16)( (((__u16)(( __u16)(__be16)(_var)) & (__u16)0x00ffU) << 8) | (((__u16)(( __u16)(__be16)(_var)) & (__u16)0xff00U) >> 8))) : __fswab16(( __u16)(__be16)(*var))) + val))));
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void be32_add_cpu(__be32 _var, u32 val)
{
*var = (( __be32)(__builtin_constant_p((__u32)(((__builtin_constant_p((__u32)(( __u32)(__be32)(_var))) ? ((__u32)( (((__u32)(( __u32)(__be32)(_var)) & (__u32)0x000000ffUL) << 24) | (((__u32)(( __u32)(__be32)(_var)) & (__u32)0x0000ff00UL) << 8) | (((__u32)(( __u32)(__be32)(_var)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(( __u32)(__be32)(_var)) & (__u32)0xff000000UL) >> 24))) : __fswab32(( __u32)(__be32)(_var))) + val))) ? ((__u32)( (((__u32)(((__builtin_constant_p((__u32)(( __u32)(__be32)(_var))) ? ((__u32)( (((__u32)(( __u32)(__be32)(_var)) & (__u32)0x000000ffUL) << 24) | (((__u32)(( __u32)(__be32)(_var)) & (__u32)0x0000ff00UL) << 8) | (((__u32)(( __u32)(__be32)(_var)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(( __u32)(__be32)(_var)) & (__u32)0xff000000UL) >> 24))) : __fswab32(( __u32)(__be32)(_var))) + val)) & (__u32)0x000000ffUL) << 24) | (((__u32)(((__builtin_constant_p((__u32)(( __u32)(__be32)(_var))) ? ((__u32)( (((__u32)(( __u32)(__be32)(_var)) & (__u32)0x000000ffUL) << 24) | (((__u32)(( __u32)(__be32)(_var)) & (__u32)0x0000ff00UL) << 8) | (((__u32)(( __u32)(__be32)(_var)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(( __u32)(__be32)(_var)) & (__u32)0xff000000UL) >> 24))) : __fswab32(( __u32)(__be32)(_var))) + val)) & (__u32)0x0000ff00UL) << 8) | (((__u32)(((__builtin_constant_p((__u32)(( __u32)(__be32)(_var))) ? ((__u32)( (((__u32)(( __u32)(__be32)(_var)) & (__u32)0x000000ffUL) << 24) | (((__u32)(( __u32)(__be32)(_var)) & (__u32)0x0000ff00UL) << 8) | (((__u32)(( __u32)(__be32)(_var)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(( __u32)(__be32)(_var)) & (__u32)0xff000000UL) >> 24))) : __fswab32(( __u32)(__be32)(_var))) + val)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(((__builtin_constant_p((__u32)(( __u32)(__be32)(_var))) ? ((__u32)( (((__u32)(( __u32)(__be32)(_var)) & (__u32)0x000000ffUL) << 24) | (((__u32)(( __u32)(__be32)(_var)) & (__u32)0x0000ff00UL) << 8) | (((__u32)(( __u32)(__be32)(_var)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(( __u32)(__be32)(_var)) & (__u32)0xff000000UL) >> 24))) : __fswab32(( __u32)(__be32)(_var))) + val)) & (__u32)0xff000000UL) >> 24))) : __fswab32(((__builtin_constant_p((__u32)(( __u32)(__be32)(_var))) ? ((__u32)( (((__u32)(( __u32)(__be32)(_var)) & (__u32)0x000000ffUL) << 24) | (((__u32)(( __u32)(__be32)(_var)) & (__u32)0x0000ff00UL) << 8) | (((__u32)(( __u32)(__be32)(_var)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(( __u32)(__be32)(_var)) & (__u32)0xff000000UL) >> 24))) : __fswab32(( __u32)(__be32)(*var))) + val))));
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void be64_add_cpu(__be64 _var, u64 val)
{
*var = (( __be64)(__builtin_constant_p((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(_var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(_var))) + val))) ? ((__u64)( (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(_var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(_var))) + val)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(_var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(_var))) + val)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(_var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(_var))) + val)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(_var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(_var))) + val)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(_var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(_var))) + val)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(_var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(_var))) + val)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(_var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(_var))) + val)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(_var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(_var))) + val)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(((__builtin_constant_p((__u64)(( __u64)(__be64)(_var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(_var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val))));
}

7 "include/linux/byteorder/little_endian.h" 2

16 "/android/public-kernel/linux-next/arch/arc/include/uapi/asm/byteorder.h" 2

6 "include/asm-generic/bitops/le.h" 2

static inline attribute((always_inline)) attribute((no_instrument_function)) unsigned long find_next_zero_bit_le(const void *addr,
unsigned long size, unsigned long offset)
{
return find_next_zero_bit(addr, size, offset);
}

static inline attribute((always_inline)) attribute((no_instrument_function)) unsigned long find_next_bit_le(const void *addr,
unsigned long size, unsigned long offset)
{
return find_next_bit(addr, size, offset);
}

static inline attribute((always_inline)) attribute((no_instrument_function)) unsigned long find_first_zero_bit_le(const void *addr,
unsigned long size)
{
return find_first_zero_bit(addr, size);
}

52 "include/asm-generic/bitops/le.h"

static inline attribute((always_inline)) attribute((no_instrument_function)) int test_bit_le(int nr, const void *addr)
{
return (__builtin_constant_p(nr ^ 0) ? __constant_test_bit((nr ^ 0), (addr)) : __test_bit((nr ^ 0), (addr)));
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void set_bit_le(int nr, void *addr)
{
set_bit(nr ^ 0, addr);
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void clear_bit_le(int nr, void *addr)
{
clear_bit(nr ^ 0, addr);
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void __set_bit_le(int nr, void *addr)
{
__set_bit(nr ^ 0, addr);
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void __clear_bit_le(int nr, void *addr)
{
__clear_bit(nr ^ 0, addr);
}

static inline attribute((always_inline)) attribute((no_instrument_function)) int test_and_set_bit_le(int nr, void *addr)
{
return test_and_set_bit(nr ^ 0, addr);
}

static inline attribute((always_inline)) attribute((no_instrument_function)) int test_and_clear_bit_le(int nr, void *addr)
{
return test_and_clear_bit(nr ^ 0, addr);
}

static inline attribute((always_inline)) attribute((no_instrument_function)) int __test_and_set_bit_le(int nr, void *addr)
{
return __test_and_set_bit(nr ^ 0, addr);
}

static inline attribute((always_inline)) attribute((no_instrument_function)) int __test_and_clear_bit_le(int nr, void *addr)
{
return __test_and_clear_bit(nr ^ 0, addr);
}

510 "/android/public-kernel/linux-next/arch/arc/include/asm/bitops.h" 2

1 "include/asm-generic/bitops/ext2-atomic-setbit.h" 1

511 "/android/public-kernel/linux-next/arch/arc/include/asm/bitops.h" 2

23 "include/linux/bitops.h" 2

46 "include/linux/bitops.h"

static inline attribute((always_inline)) attribute((no_instrument_function)) int get_bitmask_order(unsigned int count)
{
int order;

order = fls(count);
return order;
}

static inline attribute((always_inline)) attribute((no_instrument_function)) int get_count_order(unsigned int count)
{
int order;

order = fls(count) - 1;
if (count & (count - 1))
order++;
return order;
}

static inline attribute((always_inline)) attribute((no_instrument_function)) unsigned long hweight_long(unsigned long w)
{
return sizeof(w) == 4 ? (__builtin_constant_p(w) ? ((( (!!((w) & (1ULL << 0))) + (!!((w) & (1ULL << 1))) + (!!((w) & (1ULL << 2))) + (!!((w) & (1ULL << 3))) + (!!((w) & (1ULL << 4))) + (!!((w) & (1ULL << 5))) + (!!((w) & (1ULL << 6))) + (!!((w) & (1ULL << 7))) ) + ( (!!(((w) >> 8) & (1ULL << 0))) + (!!(((w) >> 8) & (1ULL << 1))) + (!!(((w) >> 8) & (1ULL << 2))) + (!!(((w) >> 8) & (1ULL << 3))) + (!!(((w) >> 8) & (1ULL << 4))) + (!!(((w) >> 8) & (1ULL << 5))) + (!!(((w) >> 8) & (1ULL << 6))) + (!!(((w) >> 8) & (1ULL << 7))) )) + (( (!!(((w) >> 16) & (1ULL << 0))) + (!!(((w) >> 16) & (1ULL << 1))) + (!!(((w) >> 16) & (1ULL << 2))) + (!!(((w) >> 16) & (1ULL << 3))) + (!!(((w) >> 16) & (1ULL << 4))) + (!!(((w) >> 16) & (1ULL << 5))) + (!!(((w) >> 16) & (1ULL << 6))) + (!!(((w) >> 16) & (1ULL << 7))) ) + ( (!!((((w) >> 16) >> 8) & (1ULL << 0))) + (!!((((w) >> 16) >> 8) & (1ULL << 1))) + (!!((((w) >> 16) >> 8) & (1ULL << 2))) + (!!((((w) >> 16) >> 8) & (1ULL << 3))) + (!!((((w) >> 16) >> 8) & (1ULL << 4))) + (!!((((w) >> 16) >> 8) & (1ULL << 5))) + (!!((((w) >> 16) >> 8) & (1ULL << 6))) + (!!((((w) >> 16) >> 8) & (1ULL << 7))) ))) : __arch_hweight32(w)) : (__builtin_constant_p(w) ? (((( (!!((w) & (1ULL << 0))) + (!!((w) & (1ULL << 1))) + (!!((w) & (1ULL << 2))) + (!!((w) & (1ULL << 3))) + (!!((w) & (1ULL << 4))) + (!!((w) & (1ULL << 5))) + (!!((w) & (1ULL << 6))) + (!!((w) & (1ULL << 7))) ) + ( (!!(((w) >> 8) & (1ULL << 0))) + (!!(((w) >> 8) & (1ULL << 1))) + (!!(((w) >> 8) & (1ULL << 2))) + (!!(((w) >> 8) & (1ULL << 3))) + (!!(((w) >> 8) & (1ULL << 4))) + (!!(((w) >> 8) & (1ULL << 5))) + (!!(((w) >> 8) & (1ULL << 6))) + (!!(((w) >> 8) & (1ULL << 7))) )) + (( (!!(((w) >> 16) & (1ULL << 0))) + (!!(((w) >> 16) & (1ULL << 1))) + (!!(((w) >> 16) & (1ULL << 2))) + (!!(((w) >> 16) & (1ULL << 3))) + (!!(((w) >> 16) & (1ULL << 4))) + (!!(((w) >> 16) & (1ULL << 5))) + (!!(((w) >> 16) & (1ULL << 6))) + (!!(((w) >> 16) & (1ULL << 7))) ) + ( (!!((((w) >> 16) >> 8) & (1ULL << 0))) + (!!((((w) >> 16) >> 8) & (1ULL << 1))) + (!!((((w) >> 16) >> 8) & (1ULL << 2))) + (!!((((w) >> 16) >> 8) & (1ULL << 3))) + (!!((((w) >> 16) >> 8) & (1ULL << 4))) + (!!((((w) >> 16) >> 8) & (1ULL << 5))) + (!!((((w) >> 16) >> 8) & (1ULL << 6))) + (!!((((w) >> 16) >> 8) & (1ULL << 7))) ))) + ((( (!!(((w) >> 32) & (1ULL << 0))) + (!!(((w) >> 32) & (1ULL << 1))) + (!!(((w) >> 32) & (1ULL << 2))) + (!!(((w) >> 32) & (1ULL << 3))) + (!!(((w) >> 32) & (1ULL << 4))) + (!!(((w) >> 32) & (1ULL << 5))) + (!!(((w) >> 32) & (1ULL << 6))) + (!!(((w) >> 32) & (1ULL << 7))) ) + ( (!!((((w) >> 32) >> 8) & (1ULL << 0))) + (!!((((w) >> 32) >> 8) & (1ULL << 1))) + (!!((((w) >> 32) >> 8) & (1ULL << 2))) + (!!((((w) >> 32) >> 8) & (1ULL << 3))) + (!!((((w) >> 32) >> 8) & (1ULL << 4))) + (!!((((w) >> 32) >> 8) & (1ULL << 5))) + (!!((((w) >> 32) >> 8) & (1ULL << 6))) + (!!((((w) >> 32) >> 8) & (1ULL << 7))) )) + (( (!!((((w) >> 32) >> 16) & (1ULL << 0))) + (!!((((w) >> 32) >> 16) & (1ULL << 1))) + (!!((((w) >> 32) >> 16) & (1ULL << 2))) + (!!((((w) >> 32) >> 16) & (1ULL << 3))) + (!!((((w) >> 32) >> 16) & (1ULL << 4))) + (!!((((w) >> 32) >> 16) & (1ULL << 5))) + (!!((((w) >> 32) >> 16) & (1ULL << 6))) + (!!((((w) >> 32) >> 16) & (1ULL << 7))) ) + ( (!!(((((w) >> 32) >> 16) >> 8) & (1ULL << 0))) + (!!(((((w) >> 32) >> 16) >> 8) & (1ULL << 1))) + (!!(((((w) >> 32) >> 16) >> 8) & (1ULL << 2))) + (!!(((((w) >> 32) >> 16) >> 8) & (1ULL << 3))) + (!!(((((w) >> 32) >> 16) >> 8) & (1ULL << 4))) + (!!(((((w) >> 32) >> 16) >> 8) & (1ULL << 5))) + (!!(((((w) >> 32) >> 16) >> 8) & (1ULL << 6))) + (!!(((((w) >> 32) >> 16) >> 8) & (1ULL << 7))) )))) : __arch_hweight64(w));
}

static inline attribute((always_inline)) attribute((no_instrument_function)) __u64 rol64(__u64 word, unsigned int shift)
{
return (word << shift) | (word >> (64 - shift));
}

static inline attribute((always_inline)) attribute((no_instrument_function)) __u64 ror64(__u64 word, unsigned int shift)
{
return (word >> shift) | (word << (64 - shift));
}

static inline attribute((always_inline)) attribute((no_instrument_function)) __u32 rol32(__u32 word, unsigned int shift)
{
return (word << shift) | (word >> (32 - shift));
}

static inline attribute((always_inline)) attribute((no_instrument_function)) __u32 ror32(__u32 word, unsigned int shift)
{
return (word >> shift) | (word << (32 - shift));
}

static inline attribute((always_inline)) attribute((no_instrument_function)) __u16 rol16(__u16 word, unsigned int shift)
{
return (word << shift) | (word >> (16 - shift));
}

static inline attribute((always_inline)) attribute((no_instrument_function)) __u16 ror16(__u16 word, unsigned int shift)
{
return (word >> shift) | (word << (16 - shift));
}

static inline attribute((always_inline)) attribute((no_instrument_function)) __u8 rol8(__u8 word, unsigned int shift)
{
return (word << shift) | (word >> (8 - shift));
}

static inline attribute((always_inline)) attribute((no_instrument_function)) __u8 ror8(__u8 word, unsigned int shift)
{
return (word >> shift) | (word << (8 - shift));
}

static inline attribute((always_inline)) attribute((no_instrument_function)) __s32 sign_extend32(__u32 value, int index)
{
__u8 shift = 31 - index;
return (__s32)(value << shift) >> shift;
}

static inline attribute((always_inline)) attribute((no_instrument_function)) unsigned fls_long(unsigned long l)
{
if (sizeof(l) == 4)
return fls(l);
return fls64(l);
}

175 "include/linux/bitops.h"

static inline attribute((always_inline)) attribute((no_instrument_function)) unsigned long __ffs64(u64 word)
{

if (((u32)word) == 0UL)
return __ffs((u32)(word >> 32)) + 32;

return __ffs((unsigned long)word);
}

196 "include/linux/bitops.h"

extern unsigned long find_last_bit(const unsigned long *addr,
unsigned long size);

11 "include/linux/kernel.h" 2

1 "include/linux/log2.h" 1

21 "include/linux/log2.h"

extern attribute((const, noreturn))
int ____ilog2_NaN(void);

31 "include/linux/log2.h"

static inline attribute((always_inline)) attribute((no_instrument_function)) attribute((const))
int __ilog2_u32(u32 n)
{
return fls(n) - 1;
}

static inline attribute((always_inline)) attribute((no_instrument_function)) attribute((const))
int __ilog2_u64(u64 n)
{
return fls64(n) - 1;
}

static inline attribute((always_inline)) attribute((no_instrument_function)) attribute((const))
bool is_power_of_2(unsigned long n)
{
return (n != 0 && ((n & (n - 1)) == 0));
}

static inline attribute((always_inline)) attribute((no_instrument_function)) attribute((const))
unsigned long __roundup_pow_of_two(unsigned long n)
{
return 1UL << fls_long(n - 1);
}

static inline attribute((always_inline)) attribute((no_instrument_function)) attribute((const))
unsigned long __rounddown_pow_of_two(unsigned long n)
{
return 1UL << (fls_long(n) - 1);
}

12 "include/linux/kernel.h" 2

1 "include/linux/typecheck.h" 1

13 "include/linux/kernel.h" 2

1 "include/linux/printk.h" 1

1 "include/linux/init.h" 1

135 "include/linux/init.h"

typedef int (_initcall_t)(void);
typedef void (_exitcall_t)(void);

extern initcall_t __con_initcall_start[], __con_initcall_end[];
extern initcall_t __security_initcall_start[], __security_initcall_end[];

typedef void (*ctor_fn_t)(void);

extern int do_one_initcall(initcall_t fn);
extern char attribute ((section(".init.data"))) boot_command_line[];
extern char *saved_command_line;
extern unsigned int reset_devices;

void setup_arch(char **);
void prepare_namespace(void);
void attribute ((section(".init.text"))) attribute((cold)) attribute((no_instrument_function)) load_default_modules(void);
int attribute ((section(".init.text"))) attribute((cold)) attribute((no_instrument_function)) init_rootfs(void);

extern void (*late_time_init)(void);

extern bool initcall_debug;

6 "include/linux/printk.h" 2

1 "include/linux/kern_levels.h" 1

7 "include/linux/printk.h" 2

extern const char linux_banner[];
extern const char linux_proc_banner[];

static inline attribute((always_inline)) attribute((no_instrument_function)) int printk_get_level(const char *buffer)
{
if (buffer[0] == '\001' && buffer[1]) {
switch (buffer[1]) {
case '0' ... '7':
case 'd':
return buffer[1];
}
}
return 0;
}

static inline attribute((always_inline)) attribute((no_instrument_function)) const char *printk_skip_level(const char *buffer)
{
if (printk_get_level(buffer)) {
switch (buffer[1]) {
case '0' ... '7':
case 'd':
return buffer + 2;
}
}
return buffer;
}

extern int console_printk[];

static inline attribute((always_inline)) attribute((no_instrument_function)) void console_silent(void)
{
(console_printk[0]) = 0;
}

static inline attribute((always_inline)) attribute((no_instrument_function)) void console_verbose(void)
{
if ((console_printk[0]))
(console_printk[0]) = 15;
}

struct va_format {
const char *fmt;
va_list *va;
};

94 "include/linux/printk.h"

static inline attribute((always_inline)) attribute((no_instrument_function)) attribute((format(printf, 1, 2)))
int no_printk(const char *fmt, ...)
{
return 0;
}

extern attribute((format(printf, 1, 2)))
void early_printk(const char *fmt, ...);
void early_vprintk(const char *fmt, va_list ap);

attribute((format(printf, 5, 0)))
int vprintk_emit(int facility, int level,
const char *dict, size_t dictlen,
const char *fmt, va_list args);

attribute((format(printf, 1, 0)))
int vprintk(const char *fmt, va_list args);

attribute((format(printf, 5, 6))) attribute((cold))
int printk_emit(int facility, int level,
const char *dict, size_t dictlen,
const char *fmt, ...);

attribute((format(printf, 1, 2))) attribute((cold))
int printk(const char *fmt, ...);

attribute((format(printf, 1, 2))) attribute((cold)) int printk_sched(const char *fmt, ...);

extern int __printk_ratelimit(const char *func);

extern bool printk_timed_ratelimit(unsigned long *caller_jiffies,
unsigned int interval_msec);

extern int printk_delay_msec;
extern int dmesg_restrict;
extern int kptr_restrict;

extern void wake_up_klogd(void);

void log_buf_kexec_setup(void);
void attribute ((section(".init.text"))) attribute((cold)) attribute((no_instrument_function)) setup_log_buf(int early);
void dump_stack_set_arch_desc(const char *fmt, ...);
void dump_stack_print_info(const char *log_lvl);
void show_regs_print_info(const char *log_lvl);

203 "include/linux/printk.h"

extern void dump_stack(void) attribute((cold));

354 "include/linux/printk.h"

extern const struct file_operations kmsg_fops;

enum {
DUMP_PREFIX_NONE,
DUMP_PREFIX_ADDRESS,
DUMP_PREFIX_OFFSET
};
extern void hex_dump_to_buffer(const void *buf, size_t len,
int rowsize, int groupsize,
char *linebuf, size_t linebuflen, bool ascii);

extern void print_hex_dump(const char *level, const char *prefix_str,
int prefix_type, int rowsize, int groupsize,
const void *buf, size_t len, bool ascii);

14 "include/linux/kernel.h" 2

1 "include/linux/dynamic_debug.h" 1

9 "include/linux/dynamic_debug.h"

struct _ddebug {

const char *modname;
const char *function;
const char *filename;
const char *format;
unsigned int lineno:18;

35 "include/linux/dynamic_debug.h"

unsigned int flags:8;
} attribute((aligned(8)));

int ddebug_add_module(struct _ddebug *tab, unsigned int n,
const char *modname);

extern int ddebug_remove_module(const char *mod_name);
extern attribute((format(printf, 2, 3)))
int __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...);

extern int ddebug_dyndbg_module_param_cb(char *param, char *val,
const char *modname);

struct device;

extern attribute((format(printf, 3, 4)))
int __dynamic_dev_dbg(struct _ddebug *descriptor, const struct device *dev,
const char *fmt, ...);

struct net_device;

extern attribute((format(printf, 3, 4)))
int __dynamic_netdev_dbg(struct _ddebug *descriptor,
const struct net_device *dev,
const char *fmt, ...);

15 "include/linux/kernel.h" 2

1 "include/uapi/linux/kernel.h" 1

1 "/android/public-kernel/linux-next/include/uapi/linux/sysinfo.h" 1

struct sysinfo {
__kernel_long_t uptime;
__kernel_ulong_t loads[3];
__kernel_ulong_t totalram;
__kernel_ulong_t freeram;
__kernel_ulong_t sharedram;
__kernel_ulong_t bufferram;
__kernel_ulong_t totalswap;
__kernel_ulong_t freeswap;
__u16 procs;
__u16 pad;
__kernel_ulong_t totalhigh;
__kernel_ulong_t freehigh;
__u32 mem_unit;
char _f[20-2*sizeof(__kernel_ulong_t)-sizeof(__u32)];
};

5 "include/uapi/linux/kernel.h" 2

17 "include/linux/kernel.h" 2

111 "include/linux/kernel.h"

1 "arch/arc/include/generated/asm/div64.h" 1

1 "include/asm-generic/div64.h" 1

35 "include/asm-generic/div64.h"

extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);

1 "arch/arc/include/generated/asm/div64.h" 2

112 "include/linux/kernel.h" 2

140 "include/linux/kernel.h"

struct completion;
struct pt_regs;
struct user;

152 "include/linux/kernel.h"

void __might_sleep(c

@jeremybennett
Copy link
Contributor

Hi Chen-Gang

This is another GCC issue. I'll ask Joern to take a look.

@ghost ghost assigned amylaar Nov 4, 2013
@Chen-Gang
Copy link
Author

On 11/04/2013 10:13 PM, Jeremy Bennett wrote:

Hi Chen-Gang

This is another GCC issue. I'll ask Joern to take a look.

OK, thank you very much, and I will/should also try (my time resource
may be not enough, but I should try).

I am not quite familiar with compiler development, but at least, for the
"segment fault" issue, I can/should make some useful steps for analyzing.

Hope we can find all root cause for all our related issues within this
month (2013-11-31).

Thanks.

Chen Gang

@jeremybennett
Copy link
Contributor

Hi Chen Gang,

Your .i and .s files appear to be inline rather than an attachment. Could you host them somewhere (e.g. dropbox) and post a link.

Thanks,

Jeremy

@Chen-Gang
Copy link
Author

On 11/05/2013 04:20 PM, Jeremy Bennett wrote:

Hi Chen Gang,

Your .i and .s files appear to be inline rather than an attachment.
Could you host them somewhere (e.g. dropbox) and post a link.

Excuse me, I have no related site for uploading it (can not provide a
related link)

So I put it in attachment, hope you can get it (if we have another more
suitable ways for it, please let me know).

Thanks.

Chen Gang

@jeremybennett
Copy link
Contributor

Hi Chen Gang,

This is a consequence of how GitHub treats email responses. It has no concept of attachments, so inlines anything you attach in email. Which for a large attachment is immensely inconvenient.

So you need to put the files somewhere and then post a link to that. Lots of suggestions on how to do this here:

http://stackoverflow.com/questions/10963205/how-to-attach-file-to-a-github-issue

HTH,

Jeremy

@Chen-Gang
Copy link
Author

On 11/05/2013 04:49 PM, Jeremy Bennett wrote:

Hi Chen Gang,

This is a consequence of how GitHub treats email responses. It has no
concept of attachments, so inlines anything you attach in email. Which
for a large attachment is immensely inconvenient.

So you need to put the files somewhere and then post a link to that.
Lots of suggestions on how to do this here:

http://stackoverflow.com/questions/10963205/how-to-attach-file-to-a-github-issue

link: http://yun.baidu.com/share/link?shareid=3796982915&uk=507417837

This is a web site, and right click each files (wm8962.?.txt) and choose
second pop up sub-menu to download.

Excuse me, it is a Chinese web site, it may display with Chinese, not
English. It is my first time to use cloud storage, and in China, it is
very slow to connect to Google, so I choose Baidu, please check.

Welcome any suggestions or completions.

Thanks.

Chen Gang

@jeremybennett
Copy link
Contributor

Hi Chen Gang

I have managed to retrieve the files and passed on to Joern. I used Google Translate, which helped identify the buttons to use.

Jeremy

@Chen-Gang
Copy link
Author

On 11/01/2013 12:43 PM, Chen Gang wrote:

On 11/01/2013 11:58 AM, Chen Gang wrote:

On 11/01/2013 11:52 AM, Chen Gang wrote:

On 11/01/2013 09:33 AM, Chen Gang wrote:

On 11/01/2013 01:02 AM, Claudiu Zissulescu wrote:

I did solve some issues related to branch shortening in dev branch
please rerun your example with it and let me know if you see the issue
again.

And for #27 is also OK -- can not cause issue again.

It seems, originally, I used an incorrect version for building kernel. :-(

For gcc issue #26, arc-gcc-4.8-dev will be OK.

So I leave a comment and close it. :-)

It sounds reasonable to me. I will try to use the develop tree.

But for this version, it will cause another issue (it can be repeated under my current environments):

Operation:

make ARCH=arc CROSS_COMPILE=/usr/local/bin/arc-elf32- EXTRA_CFLAGS=-mmedium-calls allmodconfig
make ARCH=arc CROSS_COMPILE=/usr/local/bin/arc-elf32- EXTRA_CFLAGS=-mmedium-calls menuconfig
disable CPU_BIG_ENDIAN
disable CC_OPTIMIZE_FOR_SIZE
make ARCH=arc CROSS_COMPILE=/usr/local/bin/arc-elf32- EXTRA_CFLAGS=-mmedium-calls

Error:

CC [M] fs/hfs/string.o
fs/hfs/string.c: In function 'hfs_strcmp':
fs/hfs/string.c:89:1: internal compiler error: Segmentation fault
}
^
0x7a1faf crash_signal
../../gcc-arc-4.8-dev/gcc/toplev.c:332
0x93fa27 df_get_live_in
../../gcc-arc-4.8-dev/gcc/df.h:1109

For me, in DF_LIVE_IN(), need care about NULL when DF_LIVE_BB_INFO(BB)
fails, please help check the details below, thanks.

613 #define DF_LIVE_BB_INFO(BB) (df_live_get_bb_info((BB)->index))
...

619 #define DF_LIVE_IN(BB) (&DF_LIVE_BB_INFO(BB)->in)
...

1064 static inline struct df_live_bb_info *
1065 df_live_get_bb_info (unsigned int index)
1066 {
1067 if (index < df_live->block_info_size)
1068 return &((struct df_live_bb_info *) df_live->block_info)[index];
1069 else
1070 return NULL;
1071 }
1072
...

1103 static inline bitmap
1104 df_get_live_in (basic_block bb)
1105 {
1106 gcc_checking_assert (df_lr);
1107
1108 if (df_live)
1109 return DF_LIVE_IN (bb);
1110 else
1111 return DF_LR_IN (bb);
1112 }
1113

0x93fa27 arc_hazard
../../gcc-arc-4.8-dev/gcc/config/arc/arc.c:7995
0x93fa27 arc_hazard
../../gcc-arc-4.8-dev/gcc/config/arc/arc.c:7966
0x944967 get_attr_in_delay_slot(rtx_def_)
../../gcc-arc-4.8-dev/gcc/config/arc/arc.md:441
0x945dff get_attr_in_ret_delay_slot(rtx_def_)
../../gcc-arc-4.8-dev/gcc/config/arc/arc.md:367
0x94787e get_attr_cond_ret_delay_insn(rtx_def_)
../../gcc-arc-4.8-dev/gcc/config/arc/arc.md:722
0x95e7d7 eligible_for_annul_false(rtx_def_, int, rtx_def_, int)
../../gcc-arc-4.8-dev/gcc/config/arc/arc.md:1104
0x75679e make_return_insns
../../gcc-arc-4.8-dev/gcc/reorg.c:3611
0x75679e dbr_schedule(rtx_def_)
../../gcc-arc-4.8-dev/gcc/reorg.c:3764
0x756d7f rest_of_handle_delay_slots
../../gcc-arc-4.8-dev/gcc/reorg.c:3891
Please submit a full bug report,

gcc Information:

[root@gchenlinux linux-next]# arc-elf32-gcc -v
Using built-in specs.
COLLECT_GCC=arc-elf32-gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/arc-elf32/4.8.0/lto-wrapper
Target: arc-elf32
Configured with: ../gcc-arc-4.8-dev/configure --without-header --disable-nls --enable-language=c --disable-threads --disable-shared --enable-werror=no target_configargs=enable_vtable_verify=yes --target=arc-elf32 --with-cpu=arc700 --disable-multilib --with-headers=../newlib/newlib/libc/include
Thread model: single
gcc version 4.8.0 (GCC)

Thanks.

Thanks.

Chen Gang

@Chen-Gang
Copy link
Author

On 11/10/2013 05:37 PM, Chen Gang wrote:

On 11/01/2013 12:43 PM, Chen Gang wrote:

On 11/01/2013 11:58 AM, Chen Gang wrote:

On 11/01/2013 11:52 AM, Chen Gang wrote:

On 11/01/2013 09:33 AM, Chen Gang wrote:

On 11/01/2013 01:02 AM, Claudiu Zissulescu wrote:

I did solve some issues related to branch shortening in dev branch
please rerun your example with it and let me know if you see the issue
again.

And for #27 is also OK -- can not cause issue again.

It seems, originally, I used an incorrect version for building kernel. :-(

For gcc issue #26, arc-gcc-4.8-dev will be OK.

So I leave a comment and close it. :-)

It sounds reasonable to me. I will try to use the develop tree.

But for this version, it will cause another issue (it can be repeated under my current environments):

Operation:

make ARCH=arc CROSS_COMPILE=/usr/local/bin/arc-elf32- EXTRA_CFLAGS=-mmedium-calls allmodconfig
make ARCH=arc CROSS_COMPILE=/usr/local/bin/arc-elf32- EXTRA_CFLAGS=-mmedium-calls menuconfig
disable CPU_BIG_ENDIAN
disable CC_OPTIMIZE_FOR_SIZE
make ARCH=arc CROSS_COMPILE=/usr/local/bin/arc-elf32- EXTRA_CFLAGS=-mmedium-calls

Error:

CC [M] fs/hfs/string.o
fs/hfs/string.c: In function 'hfs_strcmp':
fs/hfs/string.c:89:1: internal compiler error: Segmentation fault
}
^
0x7a1faf crash_signal
../../gcc-arc-4.8-dev/gcc/toplev.c:332
0x93fa27 df_get_live_in
../../gcc-arc-4.8-dev/gcc/df.h:1109

For me, in DF_LIVE_IN(), need care about NULL when DF_LIVE_BB_INFO(BB)
fails, please help check the details below, thanks.

After a check, it is not because of this reason (although theoretically
it will cause issue too). For this issue, the direct cause:

the related insn point to another object (not a valid insn).
so 'succ_bb' (rt_bb) will content an invalid address (0x00006d756363415f).
the related memory block is (more likly an object, not memory over flow):

0x7ffff7dcd0c8: 0x000000000000001c      0x000000000000002f
0x7ffff7dcd0d8: 0x0000006c6f6f425f      0x000074636172465f      ; _Bool, _Fract
0x7ffff7dcd0e8: 0x00006d756363415f      0x000000007461535f      ; _Accum, _Sat  ('succ_bb' contents is "_Accum" -- an invalid address.
0x7ffff7dcd0f8: 0x0000006d73615f5f      0x005f5f6d73615f5f      ; __asm, __asm__
0x7ffff7dcd108: 0x0074736e6f635f5f      0x000067616d695f5f      ; __const, __image
0x7ffff7dcd118: 0x00006c6c756e5f5f      0x00006c6165725f5f      ; ...
0x7ffff7dcd128: 0x00000000006d7361      0x000000006f747561
0x7ffff7dcd138: 0x0000006b61657262      0x0000000065736163
0x7ffff7dcd148: 0x0000000072616863      0x00000074736e6f63
0x7ffff7dcd158: 0x00746c7561666564      0x0000000000006f64

The related command is: "./cc1 /tmp/string.i -O2 -fno-reorder-blocks".

If necessary, I will send new issue for it (also upload string.i).

Thanks.

613 #define DF_LIVE_BB_INFO(BB) (df_live_get_bb_info((BB)->index))
...

619 #define DF_LIVE_IN(BB) (&DF_LIVE_BB_INFO(BB)->in)
...

1064 static inline struct df_live_bb_info *
1065 df_live_get_bb_info (unsigned int index)
1066 {
1067 if (index < df_live->block_info_size)
1068 return &((struct df_live_bb_info *) df_live->block_info)[index];
1069 else
1070 return NULL;
1071 }
1072
...

1103 static inline bitmap
1104 df_get_live_in (basic_block bb)
1105 {
1106 gcc_checking_assert (df_lr);
1107
1108 if (df_live)
1109 return DF_LIVE_IN (bb);
1110 else
1111 return DF_LR_IN (bb);
1112 }
1113

0x93fa27 arc_hazard
../../gcc-arc-4.8-dev/gcc/config/arc/arc.c:7995
0x93fa27 arc_hazard
../../gcc-arc-4.8-dev/gcc/config/arc/arc.c:7966
0x944967 get_attr_in_delay_slot(rtx_def_)
../../gcc-arc-4.8-dev/gcc/config/arc/arc.md:441
0x945dff get_attr_in_ret_delay_slot(rtx_def_)
../../gcc-arc-4.8-dev/gcc/config/arc/arc.md:367
0x94787e get_attr_cond_ret_delay_insn(rtx_def_)
../../gcc-arc-4.8-dev/gcc/config/arc/arc.md:722
0x95e7d7 eligible_for_annul_false(rtx_def_, int, rtx_def_, int)
../../gcc-arc-4.8-dev/gcc/config/arc/arc.md:1104
0x75679e make_return_insns
../../gcc-arc-4.8-dev/gcc/reorg.c:3611
0x75679e dbr_schedule(rtx_def_)
../../gcc-arc-4.8-dev/gcc/reorg.c:3764
0x756d7f rest_of_handle_delay_slots
../../gcc-arc-4.8-dev/gcc/reorg.c:3891
Please submit a full bug report,

gcc Information:

[root@gchenlinux linux-next]# arc-elf32-gcc -v
Using built-in specs.
COLLECT_GCC=arc-elf32-gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/arc-elf32/4.8.0/lto-wrapper
Target: arc-elf32
Configured with: ../gcc-arc-4.8-dev/configure --without-header --disable-nls --enable-language=c --disable-threads --disable-shared --enable-werror=no target_configargs=enable_vtable_verify=yes --target=arc-elf32 --with-cpu=arc700 --disable-multilib --with-headers=../newlib/newlib/libc/include
Thread model: single
gcc version 4.8.0 (GCC)

Thanks.

Thanks.

Chen Gang

@Chen-Gang
Copy link
Author

On 11/10/2013 08:48 PM, Chen Gang wrote:

On 11/10/2013 05:37 PM, Chen Gang wrote:

On 11/01/2013 12:43 PM, Chen Gang wrote:

On 11/01/2013 11:58 AM, Chen Gang wrote:

On 11/01/2013 11:52 AM, Chen Gang wrote:

On 11/01/2013 09:33 AM, Chen Gang wrote:

On 11/01/2013 01:02 AM, Claudiu Zissulescu wrote:

I did solve some issues related to branch shortening in dev branch
please rerun your example with it and let me know if you see the issue
again.

And for #27 is also OK -- can not cause issue again.

It seems, originally, I used an incorrect version for building kernel. :-(

For gcc issue #26, arc-gcc-4.8-dev will be OK.

So I leave a comment and close it. :-)

It sounds reasonable to me. I will try to use the develop tree.

But for this version, it will cause another issue (it can be repeated under my current environments):

Operation:

make ARCH=arc CROSS_COMPILE=/usr/local/bin/arc-elf32- EXTRA_CFLAGS=-mmedium-calls allmodconfig
make ARCH=arc CROSS_COMPILE=/usr/local/bin/arc-elf32- EXTRA_CFLAGS=-mmedium-calls menuconfig
disable CPU_BIG_ENDIAN
disable CC_OPTIMIZE_FOR_SIZE
make ARCH=arc CROSS_COMPILE=/usr/local/bin/arc-elf32- EXTRA_CFLAGS=-mmedium-calls

Error:

CC [M] fs/hfs/string.o
fs/hfs/string.c: In function 'hfs_strcmp':
fs/hfs/string.c:89:1: internal compiler error: Segmentation fault
}
^

In arc_hazard() gcc/config/arc/arc.c, if 'lab' is 'simple_return_rtx',
it will cause segment fault, so need check it. After skip it, can let
this issue solved.

---------------------------diff begin-----------------------------------

--- gcc/config/arc/arc.c 2013-11-11 13:01:38.032630106 +0800
+++ gcc/config/arc/arc.gchen.c 2013-11-11 13:01:27.680755551 +0800
@@ -7988,6 +7988,8 @@ arc_hazard (rtx pred, rtx succ)
/* Go to the target of the jump and check for aliveness
of LP_COUNT register. */
&& (!(lab = JUMP_LABEL (jump))

  •              || (lab == simple_return_rtx)
    
  •              || (lab == ret_rtx)
      || (!(succ_bb = BLOCK_FOR_INSN (lab))
          && (!NOTE_INSN_BASIC_BLOCK_P (NEXT_INSN (lab))
          || ! (succ_bb = NOTE_BASIC_BLOCK (NEXT_INSN (lab))))
    

---------------------------diff end-------------------------------------

Please help check, thanks.

0x7a1faf crash_signal
../../gcc-arc-4.8-dev/gcc/toplev.c:332
0x93fa27 df_get_live_in
../../gcc-arc-4.8-dev/gcc/df.h:1109

For me, in DF_LIVE_IN(), need care about NULL when DF_LIVE_BB_INFO(BB)
fails, please help check the details below, thanks.

After a check, it is not because of this reason (although theoretically
it will cause issue too). For this issue, the direct cause:

the related insn point to another object (not a valid insn).
so 'succ_bb' (rt_bb) will content an invalid address (0x00006d756363415f).
the related memory block is (more likly an object, not memory over flow):

0x7ffff7dcd0c8: 0x000000000000001c      0x000000000000002f
0x7ffff7dcd0d8: 0x0000006c6f6f425f      0x000074636172465f      ; _Bool, _Fract
0x7ffff7dcd0e8: 0x00006d756363415f      0x000000007461535f      ; _Accum, _Sat  ('succ_bb' contents is "_Accum" -- an invalid address.
0x7ffff7dcd0f8: 0x0000006d73615f5f      0x005f5f6d73615f5f      ; __asm, __asm__
0x7ffff7dcd108: 0x0074736e6f635f5f      0x000067616d695f5f      ; __const, __image
0x7ffff7dcd118: 0x00006c6c756e5f5f      0x00006c6165725f5f      ; ...
0x7ffff7dcd128: 0x00000000006d7361      0x000000006f747561
0x7ffff7dcd138: 0x0000006b61657262      0x0000000065736163
0x7ffff7dcd148: 0x0000000072616863      0x00000074736e6f63
0x7ffff7dcd158: 0x00746c7561666564      0x0000000000006f64

The related command is: "./cc1 /tmp/string.i -O2 -fno-reorder-blocks".

If necessary, I will send new issue for it (also upload string.i).

Thanks.

613 #define DF_LIVE_BB_INFO(BB) (df_live_get_bb_info((BB)->index))
...

619 #define DF_LIVE_IN(BB) (&DF_LIVE_BB_INFO(BB)->in)
...

1064 static inline struct df_live_bb_info *
1065 df_live_get_bb_info (unsigned int index)
1066 {
1067 if (index < df_live->block_info_size)
1068 return &((struct df_live_bb_info *) df_live->block_info)[index];
1069 else
1070 return NULL;
1071 }
1072
...

1103 static inline bitmap
1104 df_get_live_in (basic_block bb)
1105 {
1106 gcc_checking_assert (df_lr);
1107
1108 if (df_live)
1109 return DF_LIVE_IN (bb);
1110 else
1111 return DF_LR_IN (bb);
1112 }
1113

0x93fa27 arc_hazard
../../gcc-arc-4.8-dev/gcc/config/arc/arc.c:7995
0x93fa27 arc_hazard
../../gcc-arc-4.8-dev/gcc/config/arc/arc.c:7966
0x944967 get_attr_in_delay_slot(rtx_def_)
../../gcc-arc-4.8-dev/gcc/config/arc/arc.md:441
0x945dff get_attr_in_ret_delay_slot(rtx_def_)
../../gcc-arc-4.8-dev/gcc/config/arc/arc.md:367
0x94787e get_attr_cond_ret_delay_insn(rtx_def_)
../../gcc-arc-4.8-dev/gcc/config/arc/arc.md:722
0x95e7d7 eligible_for_annul_false(rtx_def_, int, rtx_def_, int)
../../gcc-arc-4.8-dev/gcc/config/arc/arc.md:1104
0x75679e make_return_insns
../../gcc-arc-4.8-dev/gcc/reorg.c:3611
0x75679e dbr_schedule(rtx_def_)
../../gcc-arc-4.8-dev/gcc/reorg.c:3764
0x756d7f rest_of_handle_delay_slots
../../gcc-arc-4.8-dev/gcc/reorg.c:3891
Please submit a full bug report,

gcc Information:

[root@gchenlinux linux-next]# arc-elf32-gcc -v
Using built-in specs.
COLLECT_GCC=arc-elf32-gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/arc-elf32/4.8.0/lto-wrapper
Target: arc-elf32
Configured with: ../gcc-arc-4.8-dev/configure --without-header --disable-nls --enable-language=c --disable-threads --disable-shared --enable-werror=no target_configargs=enable_vtable_verify=yes --target=arc-elf32 --with-cpu=arc700 --disable-multilib --with-headers=../newlib/newlib/libc/include
Thread model: single
gcc version 4.8.0 (GCC)

Thanks.

Thanks.

Chen Gang

@jeremybennett
Copy link
Contributor

Hi Chen-Gang,

Just to let you know that this is on amylaar's list to look at. He is currently investigating a related issue, and will get to this issue in a few days.

Jeremy

@Chen-Gang
Copy link
Author

On 11/12/2013 04:28 PM, Jeremy Bennett wrote:

Hi Chen-Gang,

Just to let you know that this is on amylaar's list to look at. He is
currently investigating a related issue, and will get to this issue in a
few days.

Jeremy


Reply to this email directly or view it on GitHub
#21 (comment).

OK, thanks, just take a look when you have time. This is my first time
to try to fix compiler issues. :-)

Thanks.

Chen Gang

@amylaar
Copy link
Contributor

amylaar commented Nov 12, 2013

I see we got a odd interaction between if-conversion, conditional return,
branch shortening, and eager delay slot filling.
short instructions are pulled into the delay slot of a conditional return,
and thus conditionalized; because of the
condition, thy are no longer short.

for mov.ne rq,0 , we can use sub_s.ne rq,rq,rq , but that is not
applicable to other short instructions.

@amylaar
Copy link
Contributor

amylaar commented Nov 16, 2013

I'm currently testing this patch:
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index 65482c5..85ab68c 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -691,6 +691,27 @@ struct rtl_opt_pass pass_arc_ifcvt =
}
};

+static unsigned arc_predicate_delay_insns (void);
+struct rtl_opt_pass pass_arc_predicate_delay_insns =
+{

  • {

  • RTL_PASS,

  • "arc_predicate_delay_insns", /* name */

  • OPTGROUP_NONE, /* optinfo_flags */

  • NULL, /* gate */

  • arc_predicate_delay_insns, /* execute */

  • NULL, /* sub */

  • NULL, /* next */

  • 0, /* static_pass_number */

  • TV_IFCVT2, /* tv_id */

  • 0, /* properties_required */

  • 0, /* properties_provided */

  • 0, /* properties_destroyed */

  • 0, /* todo_flags_start */

  • TODO_df_finish /* todo_flags_finish */

  • }
    +};
    +
    /* Called by OVERRIDE_OPTIONS to initialize various things. */

    void
    @@ -817,20 +838,27 @@ arc_init (void)
    /* There are two target-independent ifcvt passes, and arc_reorg may do
    one ore more arc_ifcvt calls. */
    static struct register_pass_info arc_ifcvt4_info

  • = { &pass_arc_ifcvt.pass, "dbr",

  • = { &pass_arc_predicate_delay_insns.pass, "dbr",
    1, PASS_POS_INSERT_AFTER
    };

static struct register_pass_info arc_ifcvt5_info

  • = { &pass_arc_ifcvt.pass, "dbr",
  •    1, PASS_POS_INSERT_AFTER
    
  •  };
    
  • static struct register_pass_info arc_ifcvt6_info
    = { &pass_arc_ifcvt.pass, "shorten",
    1, PASS_POS_INSERT_BEFORE
    };

if (optimize > 1 && !TARGET_NO_COND_EXEC)
{

  •  register_pass (&arc_ifcvt4_info);
    
    register_pass (&arc_ifcvt5_info);
  •  register_pass (&arc_ifcvt6_info);
    
    }
  • if (flag_delayed_branch)
  • register_pass (&arc_ifcvt4_info);
    }

/* Check ARC options, generate derived target attributes. */
@@ -8545,6 +8573,60 @@ arc_ifcvt (void)
return 0;
}

+/* Find annulled delay insns and convert them to use the appropriate predicate.

  • This allows branch shortening to size up these insns properly. */

+static unsigned
+arc_predicate_delay_insns (void)
+{

  • for (rtx insn = get_insns (); insn; insn = NEXT_INSN (insn))
  • {
  •  rtx pat, jump, dlay, src, cond, *patp;
    
  •  int reverse;
    
  •  if (!NONJUMP_INSN_P (insn)
    
  • || GET_CODE (pat = PATTERN (insn)) != SEQUENCE)
    
  • continue;
  •  jump = XVECEXP (pat, 0, 0);
    
  •  dlay = XVECEXP (pat, 0, 1);
    
  •  if (!INSN_ANNULLED_BRANCH_P (jump))
    
  • continue;
  •  /\* If the branch insn does the annulling, leave the delay insn alone.  */
    
  •  if (!TARGET_AT_DBR_CONDEXEC && !INSN_FROM_TARGET_P (dlay))
    
  • continue;
  •  /\* ??? Could also leave DLAY un-conditionalized if its target is dead
    
  • on the other path. */
  •  gcc_assert (GET_CODE (PATTERN (jump)) == SET);
    
  •  gcc_assert (SET_DEST (PATTERN (jump)) == pc_rtx);
    
  •  src = SET_SRC (PATTERN (jump));
    
  •  gcc_assert (GET_CODE (src) == IF_THEN_ELSE);
    
  •  cond = XEXP (src, 0);
    
  •  if (XEXP (src, 2) == pc_rtx)
    
  • reverse = 0;
  •  else if (XEXP (src, 1) == pc_rtx)
    
  • reverse = 1;
  •  else
    
  • gcc_unreachable ();
  •  if (!INSN_FROM_TARGET_P (dlay) != reverse)
    
  • {
  • enum machine_mode ccm = GET_MODE (XEXP (cond, 0));
    
  • enum rtx_code code = reverse_condition (GET_CODE (cond));
    
  • if (code == UNKNOWN || ccm == CC_FP_GTmode || ccm == CC_FP_GEmode)
    
  •   code = reverse_condition_maybe_unordered (GET_CODE (cond));
    
  • cond = gen_rtx_fmt_ee (code, GET_MODE (cond),
    
  •            copy_rtx (XEXP (cond, 0)),
    
  •            copy_rtx (XEXP (cond, 1)));
    
  • }
  •  else
    
  • cond = copy_rtx (cond);
  •  patp = &PATTERN (dlay);
    
  •  pat = gen_rtx_COND_EXEC (VOIDmode, cond, *patp);
    
  •  if (!validate_change (dlay, patp, pat, 0))
    
  • gcc_unreachable ();
  • }
    +}

/* For ARC600: If a write to a core reg >=32 appears in a delay slot
(other than of a forward brcc), it creates a hazard when there is a read
of the same register at the branch target. We can't know what is at the

@fbedard fbedard assigned fbedard and unassigned amylaar Sep 7, 2016
@fbedard
Copy link
Member

fbedard commented Mar 1, 2017

Binutils implementation has been completely revamped and submitted upstream as of 2016.03 release. These types of issues should be fixed with latest tools. Please re-open a new issue if you find a new instance of such a problem. Thanks.

@fbedard fbedard closed this as completed Mar 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants