Changeset 2139 for trunk/symbol_table
- Timestamp:
- May 23, 2012, 4:05:15 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/symbol_table/src/buffer.hpp
r2134 r2139 11 11 #define PADDING_BLOCKS 0 12 12 #define PADDING_SIZE (BLOCK_SIZE * PADDING_BLOCKS) 13 #define COPYBACK_BLOCKS 213 #define COPYBACK_BLOCKS 1 14 14 #define COPYBACK_SIZE (BLOCK_SIZE * COPYBACK_BLOCKS) 15 #define SEGMENT_BLOCKS 415 #define SEGMENT_BLOCKS 15 16 16 #define SEGMENT_SIZE (BLOCK_SIZE * SEGMENT_BLOCKS) 17 17 #define BUFFER_SIZE (COPYBACK_SIZE + SEGMENT_SIZE + PADDING_SIZE) … … 28 28 /////////////////////////////////////////////////////////////////////////// 29 29 #define ALLOC_STATIC_ALIGNED_BYTE_BUFFER(copyback, base) \ 30 BitBlock aligned_##base[BUFFER_SIZE]; \30 ATTRIBUTE_SIMD_ALIGN BitBlock aligned_##base[BUFFER_SIZE]; \ 31 31 assert_bitblock_align((void*)aligned_##base);\ 32 32 copyback = (uint8_t *)aligned_##base; \ … … 35 35 36 36 #define ALLOC_STATIC_ALIGNED_BITBLOCK_BUFFER(copyback, base) \ 37 BitBlock aligned_##base[BUFFER_SIZE/8]; \37 ATTRIBUTE_SIMD_ALIGN BitBlock aligned_##base[BUFFER_SIZE/8]; \ 38 38 assert_bitblock_align((void*)aligned_##base);\ 39 39 copyback = (BitBlock *) aligned_##base; \ … … 42 42 43 43 #define COPY_BACK_BYTE_BUFFER(copyback, base) \ 44 do { memmove(copyback,(uint8_t *)base + (SEGMENT_SIZE - COPYBACK_SIZE), COPYBACK_SIZE);\ 44 do { void * src = copyback;\ 45 void * dest = (uint8_t *)base + (SEGMENT_SIZE - COPYBACK_SIZE);\ 46 assert_bitblock_align(src);\ 47 assert_bitblock_align(dest);\ 48 memmove(src, dest, COPYBACK_SIZE);\ 45 49 } while(0) 46 50 47 51 #define COPY_BACK_BITBLOCK_BUFFER(copyback, base) \ 48 do { memmove(copyback,&((uint8_t *)base)[(SEGMENT_SIZE-COPYBACK_SIZE)/8],COPYBACK_SIZE/8);\ 52 do { void * src = copyback;\ 53 void * dest = (uint8_t *)base + ((SEGMENT_SIZE - COPYBACK_SIZE)/8);\ 54 assert_bitblock_align(src);\ 55 assert_bitblock_align(dest);\ 56 memmove(src, dest, COPYBACK_SIZE/8);\ 49 57 } while(0) 50 58
Note: See TracChangeset
for help on using the changeset viewer.