<feed xmlns='http://www.w3.org/2005/Atom'>
<title>libpinyin.git/src/storage, branch export-bigram</title>
<subtitle>mirror of libpinyin.</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pwu/public_git/libpinyin.git/'/>
<entry>
<title>Fix warnings</title>
<updated>2024-07-31T03:18:42+00:00</updated>
<author>
<name>Peng Wu</name>
<email>alexepico@gmail.com</email>
</author>
<published>2024-07-31T03:18:42+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pwu/public_git/libpinyin.git/commit/?id=b56d3375921238ac990b5251b220f292e6dfdd61'/>
<id>b56d3375921238ac990b5251b220f292e6dfdd61</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update class UserTableInfo</title>
<updated>2024-07-03T01:52:08+00:00</updated>
<author>
<name>Peng Wu</name>
<email>alexepico@gmail.com</email>
</author>
<published>2024-07-03T01:52:08+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pwu/public_git/libpinyin.git/commit/?id=9393d69535c4bb2ccd5967fa47b12436b7b37711'/>
<id>9393d69535c4bb2ccd5967fa47b12436b7b37711</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix code style</title>
<updated>2023-01-14T01:56:46+00:00</updated>
<author>
<name>Peng Wu</name>
<email>alexepico@gmail.com</email>
</author>
<published>2023-01-14T01:56:46+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pwu/public_git/libpinyin.git/commit/?id=4730a921d7933af06f8292e3655d9b06be82b4d7'/>
<id>4730a921d7933af06f8292e3655d9b06be82b4d7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix libpinyin crash on ARMv7</title>
<updated>2022-11-29T08:16:21+00:00</updated>
<author>
<name>Matias Larsson</name>
<email>matias.larsson@matthews.se</email>
</author>
<published>2022-11-24T17:22:55+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pwu/public_git/libpinyin.git/commit/?id=8bcea4710bd328ef74dc852d9fdffb3c47ed8abe'/>
<id>8bcea4710bd328ef74dc852d9fdffb3c47ed8abe</id>
<content type='text'>
Fix the alignment trap in get_unigram_frequency(). Fix also other
places where this same trap could happen (depending on compiler
and surrounding code).

The trap happened when the ARM GCC generated a SIMD instruction
(specifically VLDR) to load 32 bits in a single instruction, and
when the memory address was not aligned to 32 bits. VLDR traps if
the address is not aligned.

GCC generated the instruction because of the cast to uint32 from
the address. The fix is to allocate a uint32 variable in stack and
use memcpy to copy the data to that variable. This way we ensure
that appropriate instructions are generated.

**Links**

About the issue with GCC:
https://trust-in-soft.com/blog/2020/04/06/gcc-always-assumes-aligned-pointer-accesses/

How Linux does it:
https://elixir.bootlin.com/linux/v5.10.155/source/include/linux/unaligned/memmove.h#L13

ARM documentation:
https://documentation-service.arm.com/static/5f8dc043f86e16515cdbbc92?token=
    See 'A3.2.1 Unaligned data access'
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix the alignment trap in get_unigram_frequency(). Fix also other
places where this same trap could happen (depending on compiler
and surrounding code).

The trap happened when the ARM GCC generated a SIMD instruction
(specifically VLDR) to load 32 bits in a single instruction, and
when the memory address was not aligned to 32 bits. VLDR traps if
the address is not aligned.

GCC generated the instruction because of the cast to uint32 from
the address. The fix is to allocate a uint32 variable in stack and
use memcpy to copy the data to that variable. This way we ensure
that appropriate instructions are generated.

**Links**

About the issue with GCC:
https://trust-in-soft.com/blog/2020/04/06/gcc-always-assumes-aligned-pointer-accesses/

How Linux does it:
https://elixir.bootlin.com/linux/v5.10.155/source/include/linux/unaligned/memmove.h#L13

ARM documentation:
https://documentation-service.arm.com/static/5f8dc043f86e16515cdbbc92?token=
    See 'A3.2.1 Unaligned data access'
</pre>
</div>
</content>
</entry>
<entry>
<title>Support longer candidate</title>
<updated>2022-09-21T07:10:34+00:00</updated>
<author>
<name>Peng Wu</name>
<email>alexepico@gmail.com</email>
</author>
<published>2022-09-20T09:24:23+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pwu/public_git/libpinyin.git/commit/?id=698c01539cc8636dd79bd12a49e2d9a960209f98'/>
<id>698c01539cc8636dd79bd12a49e2d9a960209f98</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Write search_suggestion_with_matrix function</title>
<updated>2022-09-14T09:47:25+00:00</updated>
<author>
<name>Peng Wu</name>
<email>alexepico@gmail.com</email>
</author>
<published>2022-09-14T09:45:36+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pwu/public_git/libpinyin.git/commit/?id=baedddb15b41d7d6dbe1030195c0b343159a3b6c'/>
<id>baedddb15b41d7d6dbe1030195c0b343159a3b6c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Write FacadeChewingTable2::search_suggestion method</title>
<updated>2022-09-09T04:13:24+00:00</updated>
<author>
<name>Peng Wu</name>
<email>alexepico@gmail.com</email>
</author>
<published>2022-09-09T04:13:24+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pwu/public_git/libpinyin.git/commit/?id=95d7370ba98e9a669206e1c4709dc62fa9357f72'/>
<id>95d7370ba98e9a669206e1c4709dc62fa9357f72</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Write ChewingLargeTable2::search_suggesion method for Kyoto Cabinet</title>
<updated>2022-09-08T07:57:19+00:00</updated>
<author>
<name>Peng Wu</name>
<email>alexepico@gmail.com</email>
</author>
<published>2022-09-08T07:57:19+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pwu/public_git/libpinyin.git/commit/?id=84221ba84701faccc7849becb5a5feca829f56d7'/>
<id>84221ba84701faccc7849becb5a5feca829f56d7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Write ChewingLargeTable2::search_suggesion method for Berkeley DB</title>
<updated>2022-09-07T08:19:31+00:00</updated>
<author>
<name>Peng Wu</name>
<email>alexepico@gmail.com</email>
</author>
<published>2022-09-07T08:19:31+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pwu/public_git/libpinyin.git/commit/?id=c999e816b55459e3e7dd30456e65bc6e146cbfe3'/>
<id>c999e816b55459e3e7dd30456e65bc6e146cbfe3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Write ChewingTableEntry::search_suggestion method</title>
<updated>2022-09-02T10:45:04+00:00</updated>
<author>
<name>Peng Wu</name>
<email>alexepico@gmail.com</email>
</author>
<published>2022-09-02T10:41:09+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pwu/public_git/libpinyin.git/commit/?id=054a3e03a45984eacb21777b961c66a9736d74ba'/>
<id>054a3e03a45984eacb21777b961c66a9736d74ba</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
