search for: __aligned__

Displaying 20 results from an estimated 63 matches for "__aligned__".

Did you mean: __aligned
2010 Feb 01
2
[LLVMdev] Equivalent alignment of __attribute__((__aligned__))
Sorry as you interpreted I meant minimum alignment. My issue is in translating from a C struct which has a member aligned with __attribute__((__aligned__)) to a generated packed StructType where I use padding to force the alignment of said member. Instances of this struct are placed on the heap via malloc. Although I'm currently using static C code to determine the padding size, I'm trying to avoid using such code since I'm not sure whi...
2010 Feb 01
3
[LLVMdev] Equivalent alignment of __attribute__((__aligned__))
Is there a way using llvm::TargetData to determine the alignment of what would be equivalent to __attribute__((__aligned__))? I'm looking for something like a max alignment number for the target platform so that I know what the max alignment of an address returned by malloc(...) will be. Thanks in advance Garrison
2010 Feb 01
0
[LLVMdev] Equivalent alignment of __attribute__((__aligned__))
On Feb 1, 2010, at 12:01 PM, Garrison Venn wrote: > Sorry as you interpreted I meant minimum alignment. > > My issue is in translating from a C struct which has a member aligned with > __attribute__((__aligned__)) to a generated packed StructType where I use padding > to force the alignment of said member. Instances of this struct are placed on the heap > via malloc. Although I'm currently using static C code to determine the padding size, I'm trying > to avoid using such code since I'...
2010 Feb 01
0
[LLVMdev] Equivalent alignment of __attribute__((__aligned__))
On Feb 1, 2010, at 11:06 AM, Garrison Venn wrote: > Is there a way using llvm::TargetData to determine the alignment of what would be equivalent > to __attribute__((__aligned__))? I'm looking for something like a max alignment number for the > target platform so that I know what the max alignment of an address returned by malloc(...) will > be. Not currently. The alignment implied by attribute(aligned) is probably not something that TargetData should have, but...
2019 Oct 17
2
Static assert fails when compiler for i386
...fixes this. diff --git a/clang/lib/Headers/__stddef_max_align_t.h b/clang/lib/Headers/__stddef_max_align_t.h index e3b439285d0..46f705a09c3 100644 --- a/clang/lib/Headers/__stddef_max_align_t.h +++ b/clang/lib/Headers/__stddef_max_align_t.h @@ -21,6 +21,10 @@ typedef struct { __attribute__((__aligned__(__alignof__(long long)))); long double __clang_max_align_nonce2 __attribute__((__aligned__(__alignof__(long double)))); + #ifdef __i386__ + typedef double xx __attribute__((vector_size(16))); + xx __clang_max_align_nonce3 __attribute__((__aligned__(__alignof__(xx)))); + #endif } max...
2014 Jun 26
1
Lets work towards a new version
...of 1.3.0 (mail of Fri, > 05 Apr 2013 08:25:10 +0200, to be specific), compiling on > Raspbian (Debian Wheezy, GCC 4.6) returns quite some warnings of > the type -Wcast-align. What happens if you change the definitions of s8buffer[] and ucbuffer_[] arrays as follows: static __attribute__((__aligned__(4))) FLAC__int8 s8buffer[FLAC__MAX_BLOCK_SIZE * FLAC__MAX_CHANNELS * sizeof(FLAC__int32)]; static __attribute__((__aligned__(4))) unsigned char ucbuffer_[CHUNK_OF_SAMPLES*FLAC__MAX_CHANNELS*((FLAC__REFERENCE_CODEC_MAX_BITS_PER_SAMPLE+7)/8)]; ?
2017 Mar 17
1
[PATCH] tty: hvc: don't allocate a buffer for console print on stack
...44 > --- a/drivers/tty/hvc/hvc_console.c > +++ b/drivers/tty/hvc/hvc_console.c > @@ -143,10 +143,15 @@ static struct hvc_struct *hvc_get_by_index(int index) > static void hvc_console_print(struct console *co, const char *b, > unsigned count) > { > - char c[N_OUTBUF] __ALIGNED__; > unsigned i = 0, n = 0; > int r, donecr = 0, index = co->index; > > + /* > + * Access to the buffer is serialized by console_sem in caller code from > + * kernel/printk/printk.c > + */ > + static char c[N_OUTBUF] __ALIGNED__; What about allocating it dynamical...
2017 Mar 17
1
[PATCH] tty: hvc: don't allocate a buffer for console print on stack
...44 > --- a/drivers/tty/hvc/hvc_console.c > +++ b/drivers/tty/hvc/hvc_console.c > @@ -143,10 +143,15 @@ static struct hvc_struct *hvc_get_by_index(int index) > static void hvc_console_print(struct console *co, const char *b, > unsigned count) > { > - char c[N_OUTBUF] __ALIGNED__; > unsigned i = 0, n = 0; > int r, donecr = 0, index = co->index; > > + /* > + * Access to the buffer is serialized by console_sem in caller code from > + * kernel/printk/printk.c > + */ > + static char c[N_OUTBUF] __ALIGNED__; What about allocating it dynamical...
2010 Feb 02
0
[LLVMdev] Updated ExceptionDemo patch
...ever added to the repository, I'm submitting the new version for consistency sake, and to see if anyone is interested in porting this to windows. This version conforms to the latest mainline (2.7), and no longer includes any system include files. However there is a dependency on __attribute__((__aligned__)) being supported. This patch which will add an exception handling example to the examples directory. Both zero cost example specific, and foreign exception handling is demoed. The example's documentation fully explains how to run the example. The patch was tested for a debug build on 32bit...
2013 May 22
1
[LLVMdev] x86 frame pointer and __builtin_setjmp/__builtin_longjmp
...t is the expected behavior when the compiler chooses not to use rsp or rbp to address local variables? When built with Clang, the following program will segfault, but it is fine when built with GCC. The target is x86_64 linux. int main(int argc, char *argv[]) { void *buf[20]; __attribute__((__aligned__(64))) char q; // realign the stack char *p = __builtin_alloca(argc); // dynamic alloca if (__builtin_setjmp(buf)) { *p = 'p'; q = 'q'; return 0; } asm("movq $0, %rbx"); __builtin_longjmp(buf, 1); } LLVM is choosing to use rbx as a...
2023 Apr 10
1
[PATCH] tools/virtio: fix build caused by virtio_ring changes
...-git a/tools/virtio/linux/compiler.h b/tools/virtio/linux/compiler.h index 2c51bccb97bb..ac27b3ea6e67 100644 --- a/tools/virtio/linux/compiler.h +++ b/tools/virtio/linux/compiler.h @@ -8,4 +8,7 @@ #define READ_ONCE(var) (*((volatile typeof(var) *)(&(var)))) #define __aligned(x) __attribute((__aligned__(x))) + +#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) + #endif diff --git a/tools/virtio/linux/kernel.h b/tools/virtio/linux/kernel.h index 8b877167933d..3cd20cb92649 100644 --- a/tools/virtio/linux/kernel.h +++ b/tools/virtio/linux/kernel.h @@ -10,6 +10,7 @@ #inclu...
2012 Mar 09
10
[PATCH 0 of 9] (v2) arm: SMP boot
This patch series implements SMP boot for arch/arm, as far as getting all CPUs up and running the idle loop. Changes from v1: - moved barriers out of loop in udelay() - dropped broken GIC change in favour of explanatory comment - made the increment of ready_cpus atomic (I couldn''t move the increment to before signalling the next CPU because the PT switch has to happen between
2020 Apr 06
0
[PATCH v4 01/12] tools/virtio: define aligned attribute
...it a/tools/virtio/linux/compiler.h b/tools/virtio/linux/compiler.h index 903dc9c4bd11..2c51bccb97bb 100644 --- a/tools/virtio/linux/compiler.h +++ b/tools/virtio/linux/compiler.h @@ -7,4 +7,5 @@ #define READ_ONCE(var) (*((volatile typeof(var) *)(&(var)))) +#define __aligned(x) __attribute((__aligned__(x))) #endif -- MST
2020 Apr 06
0
[PATCH v5 01/12] tools/virtio: define aligned attribute
...it a/tools/virtio/linux/compiler.h b/tools/virtio/linux/compiler.h index 903dc9c4bd11..2c51bccb97bb 100644 --- a/tools/virtio/linux/compiler.h +++ b/tools/virtio/linux/compiler.h @@ -7,4 +7,5 @@ #define READ_ONCE(var) (*((volatile typeof(var) *)(&(var)))) +#define __aligned(x) __attribute((__aligned__(x))) #endif -- MST
2020 Apr 06
0
[PATCH v6 01/12] tools/virtio: define aligned attribute
...it a/tools/virtio/linux/compiler.h b/tools/virtio/linux/compiler.h index 903dc9c4bd11..2c51bccb97bb 100644 --- a/tools/virtio/linux/compiler.h +++ b/tools/virtio/linux/compiler.h @@ -7,4 +7,5 @@ #define READ_ONCE(var) (*((volatile typeof(var) *)(&(var)))) +#define __aligned(x) __attribute((__aligned__(x))) #endif -- MST
2020 Apr 07
0
[PATCH v7 01/19] tools/virtio: define aligned attribute
...it a/tools/virtio/linux/compiler.h b/tools/virtio/linux/compiler.h index 903dc9c4bd11..2c51bccb97bb 100644 --- a/tools/virtio/linux/compiler.h +++ b/tools/virtio/linux/compiler.h @@ -7,4 +7,5 @@ #define READ_ONCE(var) (*((volatile typeof(var) *)(&(var)))) +#define __aligned(x) __attribute((__aligned__(x))) #endif -- MST
2020 Apr 07
0
[PATCH v8 01/19] tools/virtio: define aligned attribute
...it a/tools/virtio/linux/compiler.h b/tools/virtio/linux/compiler.h index 903dc9c4bd11..2c51bccb97bb 100644 --- a/tools/virtio/linux/compiler.h +++ b/tools/virtio/linux/compiler.h @@ -7,4 +7,5 @@ #define READ_ONCE(var) (*((volatile typeof(var) *)(&(var)))) +#define __aligned(x) __attribute((__aligned__(x))) #endif -- MST
2020 Apr 06
0
[PATCH v4 01/12] tools/virtio: define aligned attribute
...it a/tools/virtio/linux/compiler.h b/tools/virtio/linux/compiler.h index 903dc9c4bd11..2c51bccb97bb 100644 --- a/tools/virtio/linux/compiler.h +++ b/tools/virtio/linux/compiler.h @@ -7,4 +7,5 @@ #define READ_ONCE(var) (*((volatile typeof(var) *)(&(var)))) +#define __aligned(x) __attribute((__aligned__(x))) #endif -- MST
2003 Dec 26
2
[Bug 84] Unaligned access in ip_tables.c:ip_packet_match
https://bugzilla.netfilter.org/cgi-bin/bugzilla/show_bug.cgi?id=84 ------- Additional Comments From tv@debian.org 2003-12-26 18:12 ------- Just wanted to note that http://lists.netfilter.org/pipermail/netfilter-devel/2003-September/012316.html http://lists.netfilter.org/pipermail/netfilter-devel/2003-September/012305.html talk about the same subject, that the same bug triggers an ugly crash
2012 Feb 25
9
[xen-unstable bisection] complete test-amd64-i386-rhel6hvm-amd
branch xen-unstable xen branch xen-unstable job test-amd64-i386-rhel6hvm-amd test redhat-install Tree: linux git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git Tree: qemu git://xenbits.xen.org/staging/qemu-xen-unstable.git Tree: qemuu git://xenbits.xen.org/staging/qemu-upstream-unstable.git Tree: xen http://xenbits.xen.org/staging/xen-unstable.hg *** Found and reproduced problem