Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
44999f8b
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
大约 1 年 前同步成功
通知
0
Star
18
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Harfbuzz
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
44999f8b
编写于
7月 11, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Align NullPool and CrapPool to HB_VECTOR_SIZE
上级
20a318d0
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
40 addition
and
31 deletion
+40
-31
src/hb-dsalgs.hh
src/hb-dsalgs.hh
+1
-2
src/hb-private.hh
src/hb-private.hh
+37
-27
src/hb-static.cc
src/hb-static.cc
+2
-2
未找到文件。
src/hb-dsalgs.hh
浏览文件 @
44999f8b
...
...
@@ -854,8 +854,7 @@ struct hb_vector_size_t
union
{
elt_t
v
[
byte_size
/
sizeof
(
elt_t
)];
#if HB_VECTOR_SIZE
typedef
unsigned
long
vec_t
__attribute__
((
vector_size
(
HB_VECTOR_SIZE
/
8
)));
vec_t
vec
[
byte_size
/
sizeof
(
vec_t
)];
hb_vector_size_impl_t
vec
[
byte_size
/
sizeof
(
hb_vector_size_impl_t
)];
#endif
}
u
;
};
...
...
src/hb-private.hh
浏览文件 @
44999f8b
...
...
@@ -334,6 +334,39 @@ static_assert ((sizeof (hb_var_int_t) == 4), "");
TypeName(const TypeName&); \
void operator=(const TypeName&)
/*
* Compiler-assisted vectorization parameters.
*/
/*
* Disable vectorization for now. To correctly use them, we should
* use posix_memalign() to allocate in hb_vector_t. Otherwise, can
* cause misaligned access.
*
* https://bugs.chromium.org/p/chromium/issues/detail?id=860184
*/
#if !defined(HB_VECTOR_SIZE)
# define HB_VECTOR_SIZE 0
#endif
/* The `vector_size' attribute was introduced in gcc 3.1. */
#if !defined(HB_VECTOR_SIZE)
# if defined( __GNUC__ ) && ( __GNUC__ >= 4 )
# define HB_VECTOR_SIZE 128
# else
# define HB_VECTOR_SIZE 0
# endif
#endif
static_assert
(
0
==
(
HB_VECTOR_SIZE
&
(
HB_VECTOR_SIZE
-
1
)),
"HB_VECTOR_SIZE is not power of 2."
);
static_assert
(
0
==
(
HB_VECTOR_SIZE
%
64
),
"HB_VECTOR_SIZE is not multiple of 64."
);
#if HB_VECTOR_SIZE
typedef
uint64_t
hb_vector_size_impl_t
__attribute__
((
vector_size
(
HB_VECTOR_SIZE
/
8
)));
#else
typedef
uint64_t
hb_vector_size_impl_t
;
#endif
/*
* Static pools
*/
...
...
@@ -341,18 +374,18 @@ static_assert ((sizeof (hb_var_int_t) == 4), "");
/* Global nul-content Null pool. Enlarge as necessary. */
#define HB_NULL_POOL_SIZE 264
static_assert
(
HB_NULL_POOL_SIZE
%
sizeof
(
void
*
)
==
0
,
"Align HB_NULL_POOL_SIZE."
);
#ifdef HB_NO_VISIBILITY
static
#else
extern
HB_INTERNAL
#endif
void
*
const
_hb_NullPool
[
HB_NULL_POOL_SIZE
/
sizeof
(
void
*
)]
hb_vector_size_impl_t
const
_hb_NullPool
[(
HB_NULL_POOL_SIZE
+
sizeof
(
hb_vector_size_impl_t
)
-
1
)
/
sizeof
(
hb_vector_size_impl_t
)]
#ifdef HB_NO_VISIBILITY
=
{}
#endif
;
/* Generic nul-content Null objects. */
template
<
typename
Type
>
static
inline
Type
const
&
Null
(
void
)
{
...
...
@@ -385,11 +418,12 @@ static
#else
extern
HB_INTERNAL
#endif
/*thread_local*/
void
*
_hb_CrapPool
[
HB_NULL_POOL_SIZE
/
sizeof
(
void
*
)]
/*thread_local*/
hb_vector_size_impl_t
_hb_CrapPool
[(
HB_NULL_POOL_SIZE
+
sizeof
(
hb_vector_size_impl_t
)
-
1
)
/
sizeof
(
hb_vector_size_impl_t
)]
#ifdef HB_NO_VISIBILITY
=
{}
#endif
;
/* CRAP pool: Common Region for Access Protection. */
template
<
typename
Type
>
static
inline
Type
&
Crap
(
void
)
{
...
...
@@ -503,30 +537,6 @@ hb_in_ranges (T u, T lo1, T hi1, T lo2, T hi2, T lo3, T hi3)
#define FLAG_RANGE(x,y) (ASSERT_STATIC_EXPR_ZERO ((x) < (y)) + FLAG(y+1) - FLAG(x))
/* Compiler-assisted vectorization. */
/*
* Disable vectorization for now. To correctly use them, we should
* use posix_memalign() to allocate them. Otherwise, can cause
* misaligned access.
*
* https://bugs.chromium.org/p/chromium/issues/detail?id=860184
*/
#if !defined(HB_VECTOR_SIZE)
# define HB_VECTOR_SIZE 0
#endif
/* The `vector_size' attribute was introduced in gcc 3.1. */
#if !defined(HB_VECTOR_SIZE)
# if defined( __GNUC__ ) && ( __GNUC__ >= 4 )
# define HB_VECTOR_SIZE 128
# else
# define HB_VECTOR_SIZE 0
# endif
#endif
/* Global runtime options. */
struct
hb_options_t
...
...
src/hb-static.cc
浏览文件 @
44999f8b
...
...
@@ -27,6 +27,6 @@
#include "hb-private.hh"
#ifndef HB_NO_VISIBILITY
void
*
const
_hb_NullPool
[
HB_NULL_POOL_SIZE
/
sizeof
(
void
*
)]
=
{};
/*thread_local*/
void
*
_hb_CrapPool
[
HB_NULL_POOL_SIZE
/
sizeof
(
void
*
)]
=
{};
hb_vector_size_impl_t
const
_hb_NullPool
[(
HB_NULL_POOL_SIZE
+
sizeof
(
hb_vector_size_impl_t
)
-
1
)
/
sizeof
(
hb_vector_size_impl_t
)]
=
{};
/*thread_local*/
hb_vector_size_impl_t
_hb_CrapPool
[(
HB_NULL_POOL_SIZE
+
sizeof
(
hb_vector_size_impl_t
)
-
1
)
/
sizeof
(
hb_vector_size_impl_t
)]
=
{};
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录