Lines Matching refs:ce32

275     static UBool isAssignedCE32(uint32_t ce32) {
276 return ce32 != FALLBACK_CE32 && ce32 != UNASSIGNED_CE32;
311 static inline uint32_t primaryFromLongPrimaryCE32(uint32_t ce32) {
312 return ce32 & 0xffffff00;
314 static inline int64_t ceFromLongPrimaryCE32(uint32_t ce32) {
315 return ((int64_t)(ce32 & 0xffffff00) << 32) | COMMON_SEC_AND_TER_CE;
321 static inline int64_t ceFromLongSecondaryCE32(uint32_t ce32) {
322 return ce32 & 0xffffff00;
334 static inline UBool isSpecialCE32(uint32_t ce32) {
335 return (ce32 & 0xff) >= SPECIAL_CE32_LOW_BYTE;
338 static inline int32_t tagFromCE32(uint32_t ce32) {
339 return (int32_t)(ce32 & 0xf);
342 static inline UBool hasCE32Tag(uint32_t ce32, int32_t tag) {
343 return isSpecialCE32(ce32) && tagFromCE32(ce32) == tag;
346 static inline UBool isLongPrimaryCE32(uint32_t ce32) {
347 return hasCE32Tag(ce32, LONG_PRIMARY_TAG);
350 static UBool isSimpleOrLongCE32(uint32_t ce32) {
351 return !isSpecialCE32(ce32) ||
352 tagFromCE32(ce32) == LONG_PRIMARY_TAG ||
353 tagFromCE32(ce32) == LONG_SECONDARY_TAG;
357 * @return TRUE if the ce32 yields one or more CEs without further data lookups
359 static UBool isSelfContainedCE32(uint32_t ce32) {
360 return !isSpecialCE32(ce32) ||
361 tagFromCE32(ce32) == LONG_PRIMARY_TAG ||
362 tagFromCE32(ce32) == LONG_SECONDARY_TAG ||
363 tagFromCE32(ce32) == LATIN_EXPANSION_TAG;
366 static inline UBool isPrefixCE32(uint32_t ce32) {
367 return hasCE32Tag(ce32, PREFIX_TAG);
370 static inline UBool isContractionCE32(uint32_t ce32) {
371 return hasCE32Tag(ce32, CONTRACTION_TAG);
374 static inline UBool ce32HasContext(uint32_t ce32) {
375 return isSpecialCE32(ce32) &&
376 (tagFromCE32(ce32) == PREFIX_TAG ||
377 tagFromCE32(ce32) == CONTRACTION_TAG);
381 * Get the first of the two Latin-expansion CEs encoded in ce32.
384 static inline int64_t latinCE0FromCE32(uint32_t ce32) {
385 return ((int64_t)(ce32 & 0xff000000) << 32) | COMMON_SECONDARY_CE | ((ce32 & 0xff0000) >> 8);
389 * Get the second of the two Latin-expansion CEs encoded in ce32.
392 static inline int64_t latinCE1FromCE32(uint32_t ce32) {
393 return ((ce32 & 0xff00) << 16) | COMMON_TERTIARY_CE;
399 static inline int32_t indexFromCE32(uint32_t ce32) {
400 return (int32_t)(ce32 >> 13);
404 * Returns the data length from a ce32.
406 static inline int32_t lengthFromCE32(uint32_t ce32) {
407 return (ce32 >> 8) & 31;
411 * Returns the digit value from a DIGIT_TAG ce32.
413 static inline char digitFromCE32(uint32_t ce32) {
414 return (char)((ce32 >> 8) & 0xf);
418 static inline int64_t ceFromSimpleCE32(uint32_t ce32) {
420 // assert (ce32 & 0xff) < SPECIAL_CE32_LOW_BYTE
421 return ((int64_t)(ce32 & 0xffff0000) << 32) | ((ce32 & 0xff00) << 16) | ((ce32 & 0xff) << 8);
425 static inline int64_t ceFromCE32(uint32_t ce32) {
426 uint32_t tertiary = ce32 & 0xff;
429 return ((int64_t)(ce32 & 0xffff0000) << 32) | ((ce32 & 0xff00) << 16) | (tertiary << 8);
431 ce32 -= tertiary;
434 return ((int64_t)ce32 << 32) | COMMON_SEC_AND_TER_CE;
438 return ce32;