<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs/src/bytecode.c, branch feature/igc</title>
<subtitle>Emacs is the extensible, customizable, self-documenting real-time display editor. 
</subtitle>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/'/>
<entry>
<title>Merge branch 'master' into feature/igc</title>
<updated>2026-01-02T20:01:55+00:00</updated>
<author>
<name>Helmut Eller</name>
</author>
<published>2026-01-02T20:01:55+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=e049ec683d3e504e2ae36b37500405b37a162786'/>
<id>e049ec683d3e504e2ae36b37500405b37a162786</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>; Add 2026 to copyright years.</title>
<updated>2026-01-01T12:54:34+00:00</updated>
<author>
<name>Sean Whitton</name>
</author>
<published>2026-01-01T12:54:34+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=c31f6adc31d48076c63ad82b83b2970e1b0d7b9b'/>
<id>c31f6adc31d48076c63ad82b83b2970e1b0d7b9b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'master' into feature/igc</title>
<updated>2025-11-12T16:48:40+00:00</updated>
<author>
<name>Helmut Eller</name>
</author>
<published>2025-11-12T16:48:40+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=7f925475a210dbf85dc52fe3315cc92a0a1ae615'/>
<id>7f925475a210dbf85dc52fe3315cc92a0a1ae615</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>; * src/bytecode.c (exec_byte_code): editing mistake (thanks Pip!)</title>
<updated>2025-10-19T13:14:20+00:00</updated>
<author>
<name>Mattias Engdegård</name>
</author>
<published>2025-10-19T13:14:20+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=04cb852c13e5dca1dedc90befc4f57b7b7b11ed6'/>
<id>04cb852c13e5dca1dedc90befc4f57b7b7b11ed6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Disable -Wclobbered for GCC in exec_byte_code (bug#79610)</title>
<updated>2025-10-19T13:09:01+00:00</updated>
<author>
<name>Mattias Engdegård</name>
</author>
<published>2025-10-19T13:02:08+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=346213f88373c50e09d620781c3dc51c21e92254'/>
<id>346213f88373c50e09d620781c3dc51c21e92254</id>
<content type='text'>
* src/bytecode.c (exec_byte_code):
Disable the -Wclobbered warning for GCC locally as the old work-around
doesn't appear to be effective for variables with explicitly assigned
registers.  This also allows us to remove that work-around which
improves the code somewhat.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/bytecode.c (exec_byte_code):
Disable the -Wclobbered warning for GCC locally as the old work-around
doesn't appear to be effective for variables with explicitly assigned
registers.  This also allows us to remove that work-around which
improves the code somewhat.
</pre>
</div>
</content>
</entry>
<entry>
<title>; exec_byte_code: refactor branch case</title>
<updated>2025-10-19T12:57:34+00:00</updated>
<author>
<name>Mattias Engdegård</name>
</author>
<published>2025-10-16T15:01:24+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=076307b16354d2968388db4c7485e09ad2a34cb7'/>
<id>076307b16354d2968388db4c7485e09ad2a34cb7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>exec_byte_code: use fixed registers for top and pc (bug#79610)</title>
<updated>2025-10-19T12:57:34+00:00</updated>
<author>
<name>Mattias Engdegård</name>
</author>
<published>2025-10-08T16:03:08+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=ae673ce20c22866ae4fbcae9a26afe8fad27ba54'/>
<id>ae673ce20c22866ae4fbcae9a26afe8fad27ba54</id>
<content type='text'>
GCC seems to have difficulty allocating important global interpreter
variables in registers; telling it which ones to use for 'top' and 'pc'
makes a big difference and seems to ease pressure enough for it to
deal with other variables as well.

We do it for AMD64 and ARM64.  Clang doesn't seem to need these directives.
It does result in -Wclobbered warnings that seem difficult to silence.

* src/bytecode.c (BC_REG_TOP, BC_REG_PC): New.
(exec_byte_code): Use them.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GCC seems to have difficulty allocating important global interpreter
variables in registers; telling it which ones to use for 'top' and 'pc'
makes a big difference and seems to ease pressure enough for it to
deal with other variables as well.

We do it for AMD64 and ARM64.  Clang doesn't seem to need these directives.
It does result in -Wclobbered warnings that seem difficult to silence.

* src/bytecode.c (BC_REG_TOP, BC_REG_PC): New.
(exec_byte_code): Use them.
</pre>
</div>
</content>
</entry>
<entry>
<title>; exec_byte_code: don't re-use op in FETCH2</title>
<updated>2025-10-19T12:57:34+00:00</updated>
<author>
<name>Mattias Engdegård</name>
</author>
<published>2025-09-23T13:01:20+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=fbc68bbc369b7d89b91763a687efbc0880c2420e'/>
<id>fbc68bbc369b7d89b91763a687efbc0880c2420e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>exec_byte_code: reduce use of semi-global 'op' (bug#79610)</title>
<updated>2025-10-19T12:57:34+00:00</updated>
<author>
<name>Mattias Engdegård</name>
</author>
<published>2025-09-22T16:33:01+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=b72e352cb42cf66e8750f6e4f53331730f544589'/>
<id>b72e352cb42cf66e8750f6e4f53331730f544589</id>
<content type='text'>
* src/bytecode.c (exec_byte_code):
Re-type op from int to ptrdiff_t, which avoids some useless conversions.
Reduce its use by using local variables for intra-block use,
and another variable (arg) where it doesn't need to be alive across
instruction dispatch.  We also eliminate it where performance doesn't
matter by re-fetching it from the instruction stream.

All this should help the register allocator.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/bytecode.c (exec_byte_code):
Re-type op from int to ptrdiff_t, which avoids some useless conversions.
Reduce its use by using local variables for intra-block use,
and another variable (arg) where it doesn't need to be alive across
instruction dispatch.  We also eliminate it where performance doesn't
matter by re-fetching it from the instruction stream.

All this should help the register allocator.
</pre>
</div>
</content>
</entry>
<entry>
<title>[MPS] Use xmalloc to allocate 'bc_thread_state' struct</title>
<updated>2025-10-13T18:25:19+00:00</updated>
<author>
<name>Pip Cet</name>
</author>
<published>2025-10-13T18:25:19+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=c6475fa2f20e92a32453272a547367232a1e3e83'/>
<id>c6475fa2f20e92a32453272a547367232a1e3e83</id>
<content type='text'>
This struct cannot live in MPS-managed memory because it's required
for scanning the bytecode stack.

* src/bytecode.c (free_bc_thread) [MPS]: Free bytecode structure.
(Finternal_stack_stats, exec_byte_code):
* src/igc.c (scan_bc): Adjust.
(root_create_bc): Save 'bc' pointer.
* src/lisp.h (get_act_rec, set_act_rec):
* src/thread.c (mark_one_thread, finalize_one_thread): Adjust.
(Fmake_thread) [MPS]:
(init_threads) [MPS]: Allocate bytecode structure.
* src/thread.h (struct thread_state): Turn 'bc' member into a
pointer (MPS) or single-member array.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This struct cannot live in MPS-managed memory because it's required
for scanning the bytecode stack.

* src/bytecode.c (free_bc_thread) [MPS]: Free bytecode structure.
(Finternal_stack_stats, exec_byte_code):
* src/igc.c (scan_bc): Adjust.
(root_create_bc): Save 'bc' pointer.
* src/lisp.h (get_act_rec, set_act_rec):
* src/thread.c (mark_one_thread, finalize_one_thread): Adjust.
(Fmake_thread) [MPS]:
(init_threads) [MPS]: Allocate bytecode structure.
* src/thread.h (struct thread_state): Turn 'bc' member into a
pointer (MPS) or single-member array.
</pre>
</div>
</content>
</entry>
</feed>
