cregit-Linux how code gets into the kernel

Release 4.14 arch/tile/include/asm/word-at-a-time.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_WORD_AT_A_TIME_H

#define _ASM_WORD_AT_A_TIME_H

#include <asm/byteorder.h>


struct word_at_a_time { /* unused */ };

#define WORD_AT_A_TIME_CONSTANTS {}

/* Generate 0x01 byte values for zero bytes using a SIMD instruction. */

static inline unsigned long has_zero(unsigned long val, unsigned long *data, const struct word_at_a_time *c) { #ifdef __tilegx__ unsigned long mask = __insn_v1cmpeqi(val, 0); #else /* tilepro */ unsigned long mask = __insn_seqib(val, 0); #endif *data = mask; return mask; }

Contributors

PersonTokensPropCommitsCommitProp
Chris Metcalf61100.00%1100.00%
Total61100.00%1100.00%

/* These operations are both nops. */ #define prep_zero_mask(val, data, c) (data) #define create_zero_mask(data) (data) /* And this operation just depends on endianness. */
static inline long find_zero(unsigned long mask) { #ifdef __BIG_ENDIAN return __builtin_clzl(mask) >> 3; #else return __builtin_ctzl(mask) >> 3; #endif }

Contributors

PersonTokensPropCommitsCommitProp
Chris Metcalf34100.00%1100.00%
Total34100.00%1100.00%

#ifdef __BIG_ENDIAN #define zero_bytemask(mask) (~1ul << (63 - __builtin_clzl(mask))) #else #define zero_bytemask(mask) ((2ul << __builtin_ctzl(mask)) - 1) #endif #endif /* _ASM_WORD_AT_A_TIME_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
Chris Metcalf15999.38%266.67%
Greg Kroah-Hartman10.62%133.33%
Total160100.00%3100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.